Deep copy with JSON


JSON.parse(JSON.stringify(o));