Skip to content

Instantly share code, notes, and snippets.

@LeanSeverino1022
Last active October 8, 2022 17:36
Show Gist options
  • Save LeanSeverino1022/b5cd676e1e4115772c2bc21e63fc4b4e to your computer and use it in GitHub Desktop.
Save LeanSeverino1022/b5cd676e1e4115772c2bc21e63fc4b4e to your computer and use it in GitHub Desktop.
pretty pring object #javascript
const output = JSON.stringify(myObject, '\t', 2);
//sample
var content = JSON.stringify({
test: 2,
game: 5
}, '\t', 2);
alert(content);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment