takes json and converts to csv
CoffeeScript
Latest commit c1ff955 Nov 20, 2013 @gradus Merge pull request #2 from eastbayjake/patch-1
Typo in readme
Permalink
Failed to load latest commit information.
example ripped out cli Mar 13, 2012
lib ripped out cli Mar 13, 2012
src ripped out cli Mar 13, 2012
test ripped out cli Mar 13, 2012
.gitignore add check for undefined Feb 24, 2012
Cakefile adding cli: Mar 2, 2012
LICENSE first commit Feb 23, 2012
package.json remove bin script Mar 13, 2012
readme.md Typo in readme Nov 19, 2013

readme.md

    __                                               
   |__|  ______ ____    ____    ____    _________  __
   |  | /  ___//  _ \  /    \ _/ ___\  /  ___/\  \/ /
   |  | \___ \(  <_> )|   |  \\  \___  \___ \  \   / 
/\__|  |/____  >\____/ |___|  / \___  >/____  >  \_/  
\______|     \/             \/      \/      \/        

jsoncsv

  • a json to csv library in javascript/coffeescript

Install

npm install jsoncsv

Usage Example in CoffeeScript

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

Usage Example in JavaScript

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);
});

Examples

  • see example folder

License

  • see LICENSE

Contributions

  • Please submit any pull requests or issues.