node-csvtojson
node-csvtojson copied to clipboard
Ignore empty rows.
I was using flag ignoreEmpty for this, But somewhere we have a static code flow that all object will have same number of keys , and this flag is causing error for that.
Is there any way to ignore only completely empty rows not rows with values in some column.
EX :
a,b,c
test1,2,3
test2,3,
test3,4,5
this is giving me
[{a :test1 , b : 2 , c:3} , {a :test2 , b : 3 }, {a :test3 , b : 4 , c:5}]
but i want this
[{a :test1 , b : 2 , c:3} , {a :test2 , b : 3 , c:""}, {a :test3 , b : 4 , c:5}]
is there any way to achieve this?
Remove ignoreEmpty option. The result will get you want.