JS如何判断json是否为空

1、判断json是否为空

jQuery.isEmptyObject();

2、遍历json

       function getHsonLength(json{
           var jsonLength=0;
           for (var i in json){
                 jsonLength++;
           }
           return jsonLength;
       }
原文地址:https://www.cnblogs.com/donaldworld/p/7423811.html