Closed smonff closed 5 years ago
I have a customer who wan't it's CSV quoted on some columns and not on others. I would have expect to find some stringify quoting option based on the columns names (header).
stringify
Expected output:
"Email";"Id";Date "foo@bar.com";"123456",2019-10-25 ...
I would have except something like this with a fictional quoted_columns option:
quoted_columns
stringify(data, { columns: columns, delimiter: ';', header: true, // column_b won't be quoted quoted_columns: ['column_a', 'column_c'] }, (err, output) => { if (err) throw err ... )
Any help appreciated.
Have a look at the cast option which allows you to activate/desactive options for each field.
cast
Thank you very much @wdavidw .
I have a customer who wan't it's CSV quoted on some columns and not on others. I would have expect to find some
stringify
quoting option based on the columns names (header).Expected output:
I would have except something like this with a fictional
quoted_columns
option:Any help appreciated.