Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You will need to clone the object somehow. The simplest solution is to go through each of the object properties and create a new object with those same properties (_.clone). Alternatively, recursively go through each property in the object and then keep going deeper through each property that is an object until you get a copy of everything to assign to a new object (_.deepClone)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: