|
-
[RESOLVED] Use Variable Value as the Object Property
Greetings, I hope I worded this correctly. I'm trying to use a variable value as the object property name. For example:
var order = new Object();
order.orderid = 12345;
The problem is, orderid is stored as a value in another string. For example:
var propertyName = 'orderid';
var order = new Object();
order.propertyName = 12345;
How can I set order.orderid equal to something when "orderid" is stored in a variable?
I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks