node-csvtojson
node-csvtojson copied to clipboard
Set column one as header
Hi, Is the a way to set column 1 as header. My CSV looks like this and there is not header.
contact.name.text, jim contact.lastname.text, jorden contact.address.state.text, CA contact.city.text, LA
expected json
{"contact" : { "name.text": "jim", "lastname.text": "jorden", "address": { "state.text": "CA", "city.text": "LA" } }
There is no header and I tried using ({noheader:true}) but the keys were all Field1 and Field2 which are expected.
By default the 1st row of the csv file is the header https://github.com/Keyang/node-csvtojson#header-row
Do not define noheader
because there is a header (1st row).
@9thstudio if this solves your problem, please close the issue