Convert a JSON array stream into CSV rows
$ npm install --save json-to-csv-stream
var jsonToCsv = require('json-to-csv-stream')
var fs = require('fs')
fs.createReadStream('./data.json')
.pipe(jsonToCsv())
.pipe(fs.createWriteStream('./data.csv'))
Type: object
Default: {}
Type: any
Default: undefined
A path for JSONStream.parse
.
Type: object
Default: undefined
Options to pass to csv-write-stream
.
MIT © Ben Drucker