Created
September 16, 2014 02:25
-
-
Save dsdstudio/3345a7c9804b8e400646 to your computer and use it in GitHub Desktop.
Javascript Array in object deep copy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var deepcopiedArray = JSON.parse(JSON.stringify(model.prevdata)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
직접 순회하면서 복사하는것 보다 JSON serialize/deserialize 를 사용하는게 훨 간단하고 좋은듯 ㅎㅎ