Skip to content

Instantly share code, notes, and snippets.

@kitz99
Created July 5, 2018 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitz99/92a53fd21b5a5b7538fe7abdd70c74a5 to your computer and use it in GitHub Desktop.
Save kitz99/92a53fd21b5a5b7538fe7abdd70c74a5 to your computer and use it in GitHub Desktop.
const obj = { opt1: ["a", "b", "c", "d"], opt2: {opt21: "aaaa", opt22: false}, opt3: "http://exaple.com" }
JSON.stringify(obj, null, 4);
// "{
// "opt1": [
// "a",
// "b",
// "c",
// "d"
// ],
// "opt2": {
// "opt21": "aaaa",
// "opt22": false
// },
// "opt3": "http://exaple.com"
// }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment