Created
February 3, 2014 21:58
-
-
Save recidive/8793283 to your computer and use it in GitHub Desktop.
Exporting hook resources to JSON files in Choko.
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
| var objectType = 'navigation'; | |
| var newObjects = newNavigations; | |
| for (var i in newObjects) { | |
| var newObject = newObjects[i]; | |
| require('fs').writeFileSync(require('path').join(__dirname, '/' + i + '.' + objectType + '.json'), JSON.stringify(newObject, null, ' '), {flag: 'w'}); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment