I have a webservice returning jsonp format. here's the code:
$(document).ready(function(){
$.getJSON("http://api.tubeupdates.com/?method=get.status&lines=central,victoria&return=name&jsonp=?",
function (result){
$.each(result.items, function(item){
$('body').append(item.response.lines[0].name);
});
}
);
});
It works fine if I remove the loop but fails with the $.each loop. Any idea of what am I doing wrong?
Thanks
Mauro