标签:
一、只有一组数据时
Json={"AA":aa,"BB":bb,"CC":cc,"DD":dd}
Json.AA ==> 结果:aa
二、多组数据时(以下格式不对,意会)
Json={"AA":aa0,"BB":bb0,"CC":cc0,"DD":dd0}
{"AA":aa1,"BB":bb1,"CC":cc1,"DD":dd1}
{"AA":aa2,"BB":bb2,"CC":cc2,"DD":dd2}
{"AA":aa3,"BB":bb3,"CC":cc3,"DD":dd3}
Json.AA ==> 结果:aa0
aa1
aa2
aa3
要具体访问aa2,要将Json放到数组里
var ArrObj = new Array();
ArrObj.push(Json);
然后就可以通过访问数组下标访问第三行数据了
ArrObj[2].AA ==> 结果:aa2
标签:
原文地址:http://www.cnblogs.com/YYvam1288/p/5358717.html