Skip to content

Commit

Permalink
Add script to split big JSON in a smaller junks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Kibish committed Oct 18, 2017
1 parent b8144c2 commit 5e24f08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/split-in-parts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const fs = require('fs');

const originalJSON = JSON.parse(fs.readFileSync('default-firabase-data.json'));

Object.keys(originalJSON).forEach(key => fs.writeFileSync(`${key}.json`, JSON.stringify(originalJSON[key])));

0 comments on commit 5e24f08

Please sign in to comment.