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.
加载中,请稍侯......
精彩评论