Tired of the one-liner JSON output, well no more! Utilize JSON.stringify built-in pretty printing. Set the 3rd parameter with your desired spacin...
For further actions, you may consider blocking this person and/or reporting abuse
Doesn't seem like the output of
JSON.stringify(protein, null, "I ๐")
is recoverable withJSON.parse
.oh ya ๐ฎ ...looking into the docs. it seems like:
Throws a SyntaxError exception if the string to parse is not valid JSON.
Definitely something to keep in mind before using the "space" parameter. thanks for catching that!
I was just curious if there would be a way to recover, for example another parameter you could pass to
parse
. There isn't though.This is awesome. Never really bothered to discover all these features. Thumbs up. :)
You're welcome! Glad you found it helpful ๐
Thank you! Saved me quite a bit of searching :)
Glad the tidbit was helpful! Thanks for reading the article ๐
Thanks! ๐