json 对象的长度 [方法直接可以调用]
- function getJsonLength(jsonData){
- var jsonLength = 0;
- for(var item in jsonData){
- jsonLength++;
- }
- return jsonLength;
- }
4.json 对象的 遍历
- for(var js2 in json2){
- console.log( js2+"="+json2[js2]);
- }
来源: http://www.qdfuns.com/article/42948/deffb812c80eb2db9c19bf94c4bd199d.html