SyntaxFix
Write A Post
Hire A Developer
Questions
If you're using jQuery, you can use extend
myElement.id =0; myElement.value=1; myArray[0] = $.extend({}, myElement); myElement.id = 2; myElement.value = 3; myArray[1] = $.extend({}, myElement);