I am reading RSS feed and pushing both Title and Link into an Array in Jquery.
What i did is
var arr = [];
$.getJSON("displayjson.php",function(data){
$.each(data.news, function(i,news){
var title = news.title;
var link = news.link;
arr.push({title : link});
});
});
And i am reading that array again using
$('#show').click(function(){
$.each(arr, function(index, value){
alert( index +' : '+value);
});
});
But it Giving me Output as
1:[Object Object]
2:[Object Object]
3:[Object Object]
like this ...
How i can get both tile and link as a pair ( title as key and link as value)