![](/img/trans.png)
[英]How do I store an array of objects that are a result of an ajax query pulling data from JSON in javascript?
[英]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”,“ Alix”,“ Bred”]},{“ data”:[“ Tylor” , “约翰”]} ]
使用jQuery.parseJSON()
。
http://api.jquery.com/jQuery.parseJSON/
然后,您可以从生成的对象中获取信息,并将任何信息(我在猜测名称)存储在Array中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.