json - How to get values of JSONP returned array -


i'm getting data on local cross domain.

$.ajax({     type: "get",     url: "http://sunnah.com/ajax/urdu/bukhari/1?callback=items",     datatype: 'jsonp',     jsonpcallback: 'items',     jsonp: 'callback',     success: function (data) {         var data = $.parsejson(data)         console.log(data);     } }); 

i can see returned json array [{"urduurn":"4000010","collection":"bukhari"}....] can seen given url. unable in console.log(data) wish put it's values html element returning data doing loop. please apprise me i'm doing mistake?

try this: $.ajax({ type: "get", url: "http://sunnah.com/ajax/urdu/bukhari/1?callback=items", datatype: 'jsonp', jsonpcallback: 'items', jsonp: 'callback', success: function (data) {     var strdata = json.stringify(data);     console.log(strdata ); } }); 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -