title: Add field to JSON
body: <p>I want to add a field to JSON. I do have a working solution, but it's ugly (using eval). Is there a nicer way to add a field?</p>
  
  <pre><code>var json = {};
  var id = "test";
  eval("json." + id + " = 5;");
  console.log(json.test);
  </code></pre>
  
  <p>UPDATE: Sorry, my question was somewhat unclear.
  I want to use the variable id, which has the value of the new field.</p>
  
  <p>Cheers,
  Bernhard</p>