#JavaScript has no proper way to clone deep objects properly. So here is a comparison of all the wrong ways that get the job done: https://dassur.ma/things/deep-copy/
JSON.parse(JSON.stringify(obj)) // is the winner with some caveats
#JavaScript has no proper way to clone deep objects properly. So here is a comparison of all the wrong ways that get the job done: https://dassur.ma/things/deep-copy/
JSON.parse(JSON.stringify(obj)) // is the winner with some caveats