开发者

How do I read data from the following json file using ajax and jQuery, and store it in an array?

[ {"data" : ["fred", "noah", "jane"]}, {"data" : ["Mallick", "Al开发者_如何学Pythonix", "Bred"]}, {"data" : ["Tylor", "John"]} ]


Use jQuery.parseJSON().

http://api.jquery.com/jQuery.parseJSON/

You can then grab the information from the resulting object and store whatever information (I'm guessing the names) in an Array.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜