write-csv
Quickest way to write a json array to a .csv file
Install
Install with npm:
npm i --save write-csv
Then require in your file:
var writeCSV =
Usage
writeFile(filename, data)
filename
String filename or file descriptordata
Array of objects
This will synchronously write your data to results.csv
like this:
a,b,cfoo,bar,bazshoo,boo,chazgaia,loves,you