Reputation:
I'm using the fast-csv node module to parse a csv and it's parsed successfully but i don't want the title of the fields. The output looks like this
[ 'ID', 'Date', 'Description', 'Amount' ]
ID
desc Description
[ '1', '12/4/30', 'kebab ab ', '-1900.00' ]
the first row is the title of the fields but want to remove them from the output. How do i do it?`
Upvotes: 2
Views: 6686
Reputation: 203286
Set the headers
option to true
to have it ignore the first line:
const parser = csv({ headers : true });
Upvotes: 3