title: Getting property in array
body: <p>I have an array that I can't get the value of a property from. 
  For example:</p>
  
  <pre><code>{
      "data": {
          "1": {
              "id": 1,
            }
        }
      "data": {
           "2": {
              "id": 2,
            }
        } 
  }
  </code></pre>
  
  <p>The number of items in the array is dynamic so I don't use a fixed number when trying to get "id". I use a loop function like this <code>for(i=0;i&lt;array.data.length;i++)</code> which then loops through numbers until the number of items is met solving the dynamic number of items problem. But the problem lies when I try to call for <code>"id"</code> using <code>array.data[i].id</code> to call for the values of "id". All I get is <code>TypeError: Cannot read property "id" of undefined</code></p>
  
  <p>So my question is, how do I get the value of "id"? </p>
  
  <p>PS: Sorry if my format is weird, or sloppy. This is my first post to stackoverflow. </p>