__
|__| ______ ____ ____ ____ _________ __
| | / ___// _ \ / \ _/ ___\ / ___/\ \/ /
| | \___ \( <_> )| | \\ \___ \___ \ \ /
/\__| |/____ >\____/ |___| / \___ >/____ > \_/
\______| \/ \/ \/ \/
- a json to csv library in javascript/coffeescript
npm install jsoncsv
fs = require 'fs'
jsoncsv = require 'jsoncsv'
COLUMNS = ['key1','key2','key3','action']
data = fs.readFileSync('data.json').toString()
jsoncsv.parse data, COLUMNS, (err, row) ->
console.log row
var jsoncsv, data, fs;
fs = require('fs');
jsoncsv = require('jsoncsv');
COLUMNS = ['key1','key2','key3','action'];
data = fs.readFileSync('data.json').toString();
jsoncsv.parse(data, COLUMNS, function(err, row) {
return console.log(row);
});
- see example folder
- see LICENSE
- Please submit any pull requests or issues.