I'm running on a mac and have a very large .json file with more than 100k objects.
I'd like to split the file into many files (preferably 50-100).
SOURCE FILE
The original .json file is a multidimensional array and looks a bit like this:
[{
"id": 1,
"item_a": "this1",
"item_b": "that1"
}, {
"id": 2,
"item_a": "this2",
"item_b": "that2"
}, {
"id": 3,
"item_a": "this3",
"item_b": "that3"
}, {
"id": 4,
"item_a": "this4",
"item_b": "that4"
}, {
"id": 5,
"item_a": "this5",
"item_b": "that5"
}]
DESIRED OUTPUT
If this were split into three files I'd like the output to look like this:
File 1:
[{
"id": 1,
"item_a": "this1",
"item_b": "that1"
}, {
"id": 2,
"item_a": "this2",
"item_b": "that2"
}]
File 2:
[{
"id": 3,
"item_a": "this3",
"item_b": "that3"
}, {
"id": 4,
"item_a": "this4",
"item_b": "that4"
}]
File 3:
[{
"id": 5,
"item_a": "this5",
"item_b": "that5"
}]
Any ideas would be greatly appreciated. Thank you!