var contact = { varWorkExperiences: [{ Experience: "aaa" },Experience: "bbb"}] };
I have a structure like this. I can use push method like this:
contact.varWorkExperiences.push({ Experience: "ccc"});
but I want to do this paramaticly
I cant do this:
var x = "Experience";
contact.varWorkExperiences.push({ x: "ccc"});
How can I solve this? I have to use push method in function but I can't pass attribute as a parameter.