Print value of json with jquery in tag <p> -


i wanted inside tag "p" referring first value: query > results > guitars > guitar > second make. possible ?

javascript:

$.getjson("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3d'http%3a%2f%2fcristianoveloz.com%2fpodcast5%2fscripts%2fguitars.xml'&format=json&diagnostics=true&callback=?", function(data){      console.log(data);            }); 

jsfiddle

to ask should use:

$(".make-text").html(data.query.results.guitars.guitar[1].make); 

of course can see data.query.results.guitars.guitar array can go though items , print them if you'd like.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -