Ok so I have been trying to retrieve a single string in JSON from this website: http://blog.teamtreehouse.com/api/get_recent_summary/?count=1
This is the snippet I have:
<html>
<head>
<title>Simple Page</title>
</head>
<script src="jquery.js"></script>
<script>
$(document).ready(function() {
$.getJSON('http://blog.teamtreehouse.com/api/get_recent_summary/?count=1', function(data)
{
alert(data.title)
});
});
</script>
</html>
Just trying to get a simple title and display it as an alert or just write it on the website, for some reason I can't get it right. I also checked that my jquery is working so it can't be that.
Thanks in advance!