How to mapping this json ?, i have been trying with multiple argument on each, but still can't get the data.
{
"data" : {
"after" : "t3_qp79c",
"before" : null,
"children" : [ {
"data" : { "url" : "http://imgur.com/c0COJ" },
"kind" : "t3"
} ],
"modhash" : ""
},
"kind" : "Listing"
}
My javascript code
$.getJSON(reddit_api_url,function(data) {
$.each(data.children['data'], function(i, reddit) {
// Uncomment line below to show tweet data in Fire Bug console
// Very helpful to find out what is available in the tweet objects
// console.log(reddit);
// Before we continue we check that we got data
console.log(i+' : '+ reddit );
// Build the html string for the current tweet
var tweet_html = reddit.url;
// Append html string to tweet_container div
$('#tweet_container').append(tweet_html);
});
}
Thanks