如何使用getJSON解析JSON. [英] How do I parse JSON with getJSON.
本文介绍了如何使用getJSON解析JSON.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何阅读网址 http://api.twitter.com/1/statuses/21947795900469248/retweeted_by.json 使用Ajax.
how to read the url http://api.twitter.com/1/statuses/21947795900469248/retweeted_by.json using ajax.
我尝试了这个但没用.
var jqxhr = $.getJSON(url, function() {
alert(jqxhr);
})
我想使用jquery从json数据中读取所有screen_name吗?
I want to read all the screen_name from the json data using the jquery?
推荐答案
您需要在最后加上callback=?
.
var url = "http://api.twitter.com/1/statuses/21947795900469248/retweeted_by.json?callback=?";
$.getJSON(url, function(data) {
alert(data[0].screen_name);
})
这篇关于如何使用getJSON解析JSON.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文