How do i convert a large CSV into JSON Arrays of fixed record set ( JSON arrays of 100 records ) through SHELL script or command line?
Eg. of Input CSV file:
identifier,type,locale
91617676848,MSISDN,es_ES
91652560975,MSISDN,es_ES
91636563675,MSISDN,es_ES
Expected output:
1.json (json array having 100 array records)
[
{
"identifier": "91617676848",
"type": "MSISDN",
"locale": "es_ES"
},
.
.
.
.
{
"identifier": "91652560975",
"type": "MSISDN",
"locale": "es_ES"
}
]
2.json (json array having 100 array records)
[
{
"identifier": "91636563675",
"type": "MSISDN",
"locale": "es_ES"
},
.
.
.
.
{
"identifier": "91636563999",
"type": "MSISDN",
"locale": "es_ES"
}
]