Possible Duplicate:
How to create an object property from a variable value in JavaScript?
I want to create an object using a value in a variable as the property name.
I have a variable called propertyName:
propertyName = "first";
How do I use the value stored in this variable as object property, as in the following?
obj.first = something; // 'first' should be extracted from propertyName