title: How to set a JSON array key on array.push on JavaScript
body: <p>I'm making some JS code, where I need to set a variable as a key in a JSON array with Javascript <code>array.push()</code>:</p>
  
  <pre><code>var test = 'dd'+questNumb;
  window.voiceTestJSON.push({test:{"title":""}, "content":{"date":""}});
  </code></pre>
  
  <p>Where <code>questNumb</code> is another variable. When doing that code, the part where I just write the <code>test</code> variable it just becomes to the key <code>"test"</code>, so I have no idea of getting this to wok. How could it be? Thanks!</p>