One of the largest flaws in JavaScript is the lack of a built in, deep object copy. There are many methods for doing this, and none work perfectly. The key is knowing the limitations of each, and picking the one that matches you needs.
obj_copy = JSON.parse(JSON.stringify(obj_to_copy)) 1 2
Problems: