Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

json-to-csv

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

json-to-csv

Writes an array of Javascript objects to a CSV file.

    1.0.0latest
    GitHub

Version published
Maintainers
1
Weekly downloads
443
decreased by-38.64%

Weekly downloads

Readme

Source

#json-to-csv

Given an array of Javascript objects and a file name, this module writes the contents of the array to a csv file, wrapped in a promise.

To Install

npm install json-to-csv

To Use

var jsonToCSV = require('json-to-csv');

To write to file:

const o = [ {a: 1, b: 2, c: 3}, {a: 4, b: 5, c: 6} ]; const fileName = 'something.csv'; jsonToCSV(o, fileName) .then(() => { // success }) .catch(error => { // handle error })

The something.csv file will appear as:

a,b,c 1,2,3 4,5,6

Keywords

FAQs

Last updated on 26 May 2016

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc