Skip to content Skip to sidebar Skip to footer

Setting Object Keys From Variables

Possible Duplicate: in javascript is it possible to construct an object literal with expressions evaluating to strings for property names? I am having a problem setting object k

Solution 1:

Try this:

var options = {};
options[currentId] = currentval; 
$.post("/inside/update.php", options);

Post a Comment for "Setting Object Keys From Variables"