Javascript strings to object
<p>I have two strings, one a key and one a value, which I would like to turn into an object and concatenate in a loop. For example:</p>

<pre><code>var data = {};
// loop starts here
  var a_key = 'element';
  var a_val = 'value';
  var a_obj = // somehow this equals { "element":"value" }
  data = data.concat(a_obj);
// loop ends here
</code></pre>

<p>I'm just not sure how to create an object from those two strings! Any help appreciated</p>
