关于js处理json格式的数据时遇到的问题
1.js循环不存在foreach 只能用for
for(var i in list)
{
i从1开始
}
2.jquery查询json格式的数据时:
{"status":0,"data":{"rw":{"7075":{"name":"\u5c0f\u4f1f\u4ed4","vip_level":"X","union_name":"\u5929\u5730\u4f1a","level":"XX","renown":"XXXX","ticket":"0","sum_fpower":"X","trend":0,"rank":1},"7617":{"name":"\u5b50\u6602","vip_level":"X","union_name":"\u5929\u5730\u4f1a","level":"XX","renown":"XXXX","ticket":"0","sum_fpower":"XXXXX","trend":0,"rank":2},"923":{"name":"\u8303\u5f0f\u4e4b\u9b42","vip_level":"XX","union_name":"\u96c7\u4f63\u519b","level":"XXX","renown":"XXXX","ticket":"0","sum_fpower":"XXXX","trend":0,"rank":3},"2288":{"name":"\u6b66\u53ef\u6101","vip_level":"X","union_name":"\u96c7\u4f63\u519b","level":"XX","renown":"XXXXX","ticket":"0","sum_fpower":"XXXX","trend":0,"rank":4},"186":{"name":"\u5b97\u4e2d\u9053","vip_level":"X","union_name":"\u96c7\u4f63\u519b","level":"XXX","renown":"XXXX","ticket":"0","sum_fpower":"XXXXX","trend":0,"rank":5},"767":{"name":"\u53c1\u8beb","vip_level":"XXX","union_name":"\u96c7\u4f63\u519b","level":"XXX","renown":"XXXX","ticket":"0","sum_fpower":"XXXXX","trend":0,"rank":6},"3463":{"name":"\u949f\u79bb\u73ca\u73ca","vip_level":"6XXunion_name":"\u96c7\u4f63\u519b","level":"XX","renown":"XXXX","ticket":"0","sum_fpower":"XXXX","trend":0,"rank":7},"1848":{"name":"\u94b1\u591a\u591a","vip_level":"XX","union_name":"\u5929\u5730\u4f1a","level":"XX","renown":"XXXXX","ticket":"0","sum_fpower":"XXXXX","trend":0,"rank":8},"759":{"name":"\u6697\u81ea\u5728\u5929","vip_level":"5XXunion_name":"\u96c7\u4f63\u519b","level":"XX","renown":"XXXX","ticket":"0","sum_fpower":"XXXX","trend":0,"rank":9},"4065":{"name":"\u970d\u6210\u8d25","vip_level":"6XXunion_name":"\u96c7\u4f63\u519b","level":"XX","renown":"XXXX","ticket":"0","sum_fpower":"XXXXX","trend":0,"rank":10}}}}
这样的用.来获取下面的属性