title: How to create an array of object literals in a loop?
body: <p>I need to create an array of object literals like this:</p>
  
  <pre><code>var myColumnDefs = [
      {key:"label", sortable:true, resizeable:true},
      {key:"notes", sortable:true,resizeable:true},......
  </code></pre>
  
  <p>In a loop like this:</p>
  
  <pre><code>for (var i = 0; i &lt; oFullResponse.results.length; i++) {
      console.log(oFullResponse.results[i].label);
  }
  </code></pre>
  
  <p>The value of <code>key</code> should be <code>results[i].label</code> in each element of the array.</p>