title: set custom JSON object names in a for loop
body: <p>How do I set custom JSON object name in a for loop.</p>
  
  <pre><code>var myArray = [];
  
  for (var i = 0; i&lt;= 8; i++){
  
      var x = "name" + i;
  
      myArray.push({x:[0,0,0]});
  
  }
  </code></pre>
  
  <p>I want this</p>
  
  <pre><code>myArray = [
              {name0:[0,0,0]},
              {name1:[0,0,0]},
              {name2:[0,0,0]},
              {name3:[0,0,0]},
              {name4:[0,0,0]},
              {name5:[0,0,0]},
              {name6:[0,0,0]},
              {name7:[0,0,0]},
              {name8:[0,0,0]},
              ];
  </code></pre>
  
  <p>but it returns this</p>
  
  <pre><code>myArray = [
              {x:[0,0,0]},
              {x:[0,0,0]},
              {x:[0,0,0]},
              {x:[0,0,0]},
              {x:[0,0,0]},
              {x:[0,0,0]},
              {x:[0,0,0]},
              {x:[0,0,0]},
              {x:[0,0,0]},
              ];
  </code></pre>