There are a lot of frameworks for the frontend:
object2 = object1.clone();
Problem courtesy of: never_had_a_name
Underscore might work for you.
checkout this list of Node modules.
Solution courtesy of: fbstj