Created
August 3, 2015 07:49
-
-
Save louisbl/3793e9fc01d73348db6b to your computer and use it in GitHub Desktop.
Unflatten json object (like from csv)
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 flat = require('flat'); | |
var de = require('./flat.json'); | |
var fs = require('fs'); | |
fs.writeFile('./unflat.json', JSON.stringify(flat.unflatten(de))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment