@onelastjedi/json2csv

1.0.5 • Public • Published

bundle size version downloads

json2csv

JavaScript library to convert JSON to CSV and back. Has no dependencies. Only works with flat objects.

Installation

If you use npm, npm install @onelastjedi/json2csv. You can also download the latest release on GitHub.

Use

import parse from '@onelastjedi/json2csv'

const csv = 'name,developer,age\nMary,true,25'
const json = { name: 'John', developer: false, age: 30 }

parse.csv2json(csv) // [{ name: 'Mary', developer: true, age: 25}]
parse.json2csv(json) // name,developer,age\nJohn,false,30

License

ISC

Package Sidebar

Install

npm i @onelastjedi/json2csv

Weekly Downloads

98

Version

1.0.5

License

ISC

Unpacked Size

11.8 kB

Total Files

11

Last publish

Collaborators

  • onelastjedi