<script type="text/javascript">
    var myObject = {'name':'Camili', 'address':'columbo','age': '29'};
    var count = Object.keys(myObject).length;
    console.log(count);

</script>

这样就可以获取json对象的长度啦~