获取json数据长度
获取json数据长度
(1)json对象
eg:
var obj = {'name':'baby', 'address':'Jinan','age': 'xyz'} var len = Object.keys(obj).length
(2)json数组
eg:
var array= [{'name':'baby', 'address':'Jinan','age': 'xyz'}] var length = array.length;
获取json数据长度
(1)json对象
eg:
var obj = {'name':'baby', 'address':'Jinan','age': 'xyz'} var len = Object.keys(obj).length
(2)json数组
eg:
var array= [{'name':'baby', 'address':'Jinan','age': 'xyz'}] var length = array.length;