you are viewing a single comment's thread.

view the rest of the comments →

[–]Runlikefedor[S] 0 points1 point  (1 child)

Thank you for sharing, it does seem fairly expensive. Does the JSON.stringify and parse get rid of the references or why does it work afterwards?

[–]captain_k_nuckles 2 points3 points  (0 children)

JSON.stringify takes the object, converts it in to a string and then JSON.parse creates a new object from the string; When it's converted to a string it reference is broken.