How do I create a dynamic key for a key/value pair in JavaScript?
<p>Just now my code is: </p>

<pre><code>data = {'field_name':"some value",'name':$(this).val()};
</code></pre>

<p>However, I'd like to change the name key so it is dynamic, e.g something like: </p>

<pre><code>var name = $(this).attr('id');
data = {'field_name':"some value",name:$(this).val()};
</code></pre>

<p>Is that possible? </p>
