I’ve found that the following works if you’re not using jQuery and only interested in cloning simple objects (see comments).
JSON.parse(JSON.stringify(json_original));
Documentation
- JSON.parse()
- JSON.stringify()
I’ve found that the following works if you’re not using jQuery and only interested in cloning simple objects (see comments).
JSON.parse(JSON.stringify(json_original));
Documentation