开发者

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

开发者 https://www.devze.com 2023-02-06 16:23 出处:网络
[ {\"data\" : [\"fred\", \"noah\", \"jane\"]}, {\"data\" : [\"Mallick\", \"Al开发者_如何学Pythonix\", \"Bred\"]},

[ {"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

精彩评论

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