title: How to push to associative array in javascript?
body: <p>I know this question was asked many times but i cant get it to work properly as i need.
  In a node.js ws i push objects into some array like this:</p>
  
  <pre><code>var arr = [];
  arr.push({"name": "someName", "id": 12345});
  </code></pre>
  
  <p>and at the end i send it as a json in the response. 
  How can i push into the array so ill be able to extract data like this ( in the client side ):
  ** the ID numbers are unique</p>
  
  <pre><code>var name = dataArr[12345];  //will return 'someName'
  </code></pre>
  
  <p>Im trying to avoid the need to iterate the whole array to get specific values.</p>