I am storing js objects using jQuery.data
eg. var newDeployment = { server: server, application: application, references: references }; $('select#something option:first').data('value', newDeployment); The problem is that I then want to get a copy of that value, to modify, and store elsewhere, but it is like I am getting a reference to the object, since if I say var newVar = $('select#something option:first').data('value'); newVar.references = newReferences; it's updating the value in $('select#something option:first').data('value') instead of just newVar Is there a way to get just a copy of the data, not the reference to the data itself? -- View this message in context: http://www.nabble.com/storing-objects-in-jQuery-data-tp21318127s27240p21318127.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.