title: Creating json keys on the fly
body: <p>I would like to create a <code>json</code> object to send as a post array, but I need to create the key on the fly</p>
  
  <pre><code>var id = $('#myInput').val();
  
  var post = {
      'product[123]': 'myValue',     // this works fine - but isn't dynamic
      'product['+id+']': 'myValue'   // this does not work
  }
  </code></pre>
  
  <p>Sending it in as a string works fine, but I get an issue when I want to make it more dynamic. Am I missing something really simple here, or am I trying to do something Javascript isn't supposed to do?</p>