console.dir(someObject);

<script type="text/javascript">
        function test(){
            var array = [{"id":1},{"id":2}];
            console.dir(array);
        }
</script>

结果:

Array[2]
0: Object
id: 1
__proto__: Object
1: Object
id: 2
__proto__: Object
length: 2
__proto__: Array[0]
 

Console控制台查看结果

原文地址:https://www.cnblogs.com/zno2/p/4495192.html