Hi I'm just trying to do some simple AJAX stuff by retrieving search results from Twitter. It is bringing back the objects but I can't seem to drill down to the object itself and get the info (such as text).
If I console.log(tweet), it lists all the objects, but the code below just says "undefined". I'm sure I'm missing something easy.
I've read loads of questions/answers on here but none seem to do it. I see many have used the .getJSON() method, but using .ajax() should be ok I would have thought?
$.ajax({
dataType: 'jsonp',
url: 'http://search.twitter.com/search.json?callback=?&q=twitter&rpp=5',
success: function (data) {
$.each(data, function(i,tweet){
console.log(tweet.text);
//$('#twitter ul').append('<li><a href="' + item.text + '">' + item.from_user_id + '</a></li>');
});
}
});