Length of javascript array where items are objects
<p>I came across to this problem. I have defined an array and populated it with objects,
If first case my data array look like this on firebug console:</p>

<pre><code>data = [
    Object { code="6", id="1073148", key="82628835"},
    Object { code="17", id="2073140", key="83628837"}
]
</code></pre>

<p>And when I check its length I get <code>2</code> from <code>data.length</code></p>

<p>In second case I have </p>

<pre><code>data = [
    [Object { code="6", id="1073148", key="82628835"}],
    [Object { code="17", id="2073140", key="83628837"}]
]
</code></pre>

<p>And this one returns <code>2</code> also when I check <code>data.length</code> </p>

<p>Can someone explain me why I am getting same lengths for this different cases. </p>

<p><strong>Edit after some answers</strong>
data is populated using <code>$.parseJSON</code> what is confusing to me is
in fist case I can access value of code by <code>data[0].code</code> and in second case 
I cannot access it by <code>data[0][0].code</code> </p>

<p>If they are the same children of array why I cannot access them using same indices.
Then why they have same length?</p>
