Skip to content

Instantly share code, notes, and snippets.

@theaccordance
Created May 10, 2016 20:05
Show Gist options
  • Select an option

  • Save theaccordance/03f4e3a447a76547c90e1fabcf456a2c to your computer and use it in GitHub Desktop.

Select an option

Save theaccordance/03f4e3a447a76547c90e1fabcf456a2c to your computer and use it in GitHub Desktop.
Code snippet to write an output to JSON. Requires 'fs' module in file.
fs.writeFile('debugTeam.json', JSON.stringify(data, null, 4), function (err) {
if (err) {
console.log('error writing debug file');
} else {
console.log('debug file written.');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment