JavaScript-这段json 如何解析?
[{success:1,msg:[{"N":"煤炭","C":"002004","NewC":"BK2004","F":8.94,"F5":2.76,"I":2.62,"J":1.92573e+009,"SZJ":31,"XDJ":1,"QS":"600397","RS":"600408"},{"N":"钢铁","C":"002006","NewC":"BK2006","F":7.8,"F5":2.08,"I":3.52,"J":2.48738e+009,"SZJ":35,"XDJ":0,"QS":"600808","RS":"000000"},{"N":"牧渔","C":"002002","NewC":"BK2002","F":6.57,"F5":-4.06,"I":3.96,"J":-3.3042e+007,"SZJ":15,"XDJ":6,"QS":"300498","RS":"300094"}]}]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
分清楚数组、对象的嵌套关系,最简单的方法是直接用数组的格式去读。
obj[0].msg[0].N
or
obj[0]['msg'][0].N
or
obj[0]['msg'][0]['N']