Gamex Gamex - 5 months ago 19
JSON Question

JSON url parsing issue with jquery

I have a requirement to parse iTunes url and display data. I have an issue when I'm parsing, can anyone who knows how to do it, parse below url in jQuery ajax or js?

I have tried a lot but getting error undefined.

function onDeviceReady() {
// Now safe to use device APIs
var flickerAPI = "https://itunes.apple.com/in/rss/topalbums/limit=10/json";
$.getJSON(flickerAPI, { format: "json" })
.done(function(data) {
$('#your-tweet').append('<li>'+data);
});
}

Answer

You can get all name list with below code .

for(i=0;i<=10;i++) 

    { 

         var d1 = data.feed.entry[i]["im:name"].label;

        alert(d1)

    }