how to use a variable value as property of an object?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2241875/how-to-create-object-property-from-variable-value-in-javascript">How to create object property from variable value in javascript?</a>  </p>
</blockquote>



<p>I want to create an object using a value in a variable as the property name. </p>

<p>I have a variable called propertyName:</p>

<pre><code>propertyName = "first";
</code></pre>

<p>How do I use the value stored in this variable as object propery:</p>

<pre><code>obj.first = something; // 'first' should be extracted from propertyName
</code></pre>
