I'd hope to find an example code to do a deep copying of objects in ECMAScript5.
The copying should be able to clone
Nested objects
Nested arrays
Nested objects in arrays (clone each array item individually)
Note: jQuery.extend() does not seem to handle case 3). Also, I'd hope to do this in clean ECMAScript. Quick googling did not bring up any worthy implementations.
I finally settled to jQuery.extend() as I couldn't find other good implementations
http://api.jquery.com/jQuery.extend/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With