> problem is, the key in the code block, does not get interpreted as a > variable.
You can't use variables as property names in object literal syntax,
but you can use them in square-bracketed property assignment.
{ variable: value } // no worky
o[variable] = value; // workity-works
You'll have to figure out some way to use the second syntax.
-- Sandy
