I need to create an object which has a constant first key property. and the rest are dynamic (comes from db) my solution is.. lets say like this:
var bar="bar"; //comes from db;
var myProperties="trick":"treat","man":"woman"; // comes from db
var obj = {"foo":bar, myProperties}
but i had an error. and i am not sure how to deal with this requirement.
anyone? alternative solution?