Created
October 9, 2017 11:49
-
-
Save arpo/6960347b9ad7b70d1feb2ae67702bce3 to your computer and use it in GitHub Desktop.
Pretty-print JSON using JavaScript
This file contains hidden or 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
JSON.stringify(jsObj, null, "\t"); // stringify with tabs inserted at each level | |
JSON.stringify(jsObj, null, 4); // stringify with 4 spaces at each level |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment