title: Passing in dynamic key:value pairs to an object literal?
body: <p>I am using this slice of code (shown below) in an attempt to populate the object literal named  <code>Parameters</code> inside the for loop. I need the <code>key:value</code> pair to be assigned in conjunction with the loops iterating <code>i</code> variable, as such: <code>{key_1:chunks[1],key_2:chunks[2]}</code>. However, my code isn't working. The <code>'key_'+i</code> is not being reflected in the literal.</p>
  
  <p>There's something I am missing here, obviously. Can someone tell me what it is?...Thanks.</p>
  
  <pre><code>var Parameters=[];
  var len = chunks.length;
  for (var i = 0; i &lt; len; i++) {
      var key='key_'+i
      obj= { key : chunks[i]};
     Parameters.push(obj)
  }
  </code></pre>