deep copy javascript 1

deep copy javascript

JSON.parse(JSON.stringify(object))

Here is what the above code is Doing:
1. JSON.stringify() converts the JavaScript object into a JSON string.
2. JSON.parse() converts the JSON string back into a JavaScript object.

Similar Posts