title: JavaScript set anonymous Object key to variable name
body: <pre><code>    var curr = data[i],
          newArray = [],
          key = curr.Frequency.Type,
          obj = {key: []};
      newArray.push(obj);
  </code></pre>
  
  <p>However, this yields an object with a key of "key"! How can I create a new object with a key of the value of the variable <code>key</code>?</p>