javascript - Return all values ​​for the title JSON -


currently displaying 1 title of titles printed.

$.getjson("http://...", function (data) {     $(".make-text").html(data.query.results.channel.item[0].title); }); 

jsfiddle

demo

you need iterate on items.

$.getjson("...", function (data) {     var titles = data.query.results.channel.item.map(function(item) {         return item.title;     });     $(".make-text").html(titles.join('<br>')); }); 

map used extract property of objects in array.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -