Created
May 10, 2016 20:05
-
-
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.
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
| 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