Skip to content

Instantly share code, notes, and snippets.

@acidtone
Last active March 17, 2021 16:58
Show Gist options
  • Save acidtone/9ba1c784d5f78fdc9dc4df9c6f26bcf8 to your computer and use it in GitHub Desktop.
Save acidtone/9ba1c784d5f78fdc9dc4df9c6f26bcf8 to your computer and use it in GitHub Desktop.
JSON: Converting Javascript to JSON files

Converting Javascript objects into json files

  1. Take an Array or Object of your choice and copy it to your clipboard.
  2. Search: convert javascript to json
  3. Paste your Javascript into a converter (above) of your choice.
  4. Copy the JSON result to your clipboard.
  5. Paste the JSON into a file with a .json extension.

Important: json files are for data only. Don't include Javascript logic like =, const, etc. Stick to arrays and object values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment