title: Increment data array in javascript
body: <p>I have array with following structure/data:</p>
  
  <pre><code>1: Object
  -2: Object
  -- name : test
  -- username : test
  -- email : test@email.com
  -4: Object
  -- name : test4
  -- username : test4
  -- email : test4@email.com
  -5: Object
  -- name : test5
  -- username : test5
  -- email : test5@email.com
  </code></pre>
  
  <p>My js:</p>
  
  <pre><code>for (var i =0; i &lt; 5; i++){
      var r = $('#name').val(datas[1][i].name);
      console.log(r)
  }
  </code></pre>
  
  <p>Why is <code>datas[1][i].name</code> undefined?</p>
  
  <p>I want <code>var i</code> to increment.</p>