This small tool splits JSON array file to smaller files (<1MB)
Usage: json-split -f <file> -s <size> -o <output>
Options:
--help Show help [boolean]
--version Show version number [boolean]
-f, --file Path to JSON file. [string] [required]
-s, --size Size in Kb (Default: 1000Kb) [number]
-n, --name Preferred output name (Default: Same as file) [string]
Run using npx
and pass necessary parameters. The script will create an export
folder with the slices in the same place as your imported json.
npx @pixelygroup/json-splitter --size 2000 --file ./path-to-file/the-file.json
- Download the repository.
- Enter the directory and run
npm install -g .
In your terminal run command:
npm install -g @pixelygroup/json-splitter
npm uninstall -g @pixelygroup/json-splitter