Skip to content

Instantly share code, notes, and snippets.

@dsdstudio
Created September 16, 2014 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsdstudio/3345a7c9804b8e400646 to your computer and use it in GitHub Desktop.
Save dsdstudio/3345a7c9804b8e400646 to your computer and use it in GitHub Desktop.
Javascript Array in object deep copy
var deepcopiedArray = JSON.parse(JSON.stringify(model.prevdata));
@dsdstudio
Copy link
Author

직접 순회하면서 복사하는것 보다 JSON serialize/deserialize 를 사용하는게 훨 간단하고 좋은듯 ㅎㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment