Created
April 16, 2020 07:57
-
-
Save munkhorgil/9b9a127eaa8f1e70b332b67d274d5472 to your computer and use it in GitHub Desktop.
JSON.parse() wrap object
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
const obj = { | |
toString() { | |
return "[1,2,3]"; | |
} | |
}; | |
console.log(JSON.parse(obj)); | |
// (3) [1, 2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment