https://github.com/null-none/convertjsoncsv
Javascript module for convert json to csv and csv to json
https://github.com/null-none/convertjsoncsv
cvs javascript json nodejs
Last synced: about 1 month ago
JSON representation
Javascript module for convert json to csv and csv to json
- Host: GitHub
- URL: https://github.com/null-none/convertjsoncsv
- Owner: null-none
- Created: 2016-09-03T18:40:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-12T08:08:56.000Z (almost 5 years ago)
- Last Synced: 2025-01-26T09:28:39.793Z (3 months ago)
- Topics: cvs, javascript, json, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/convert-json-csv
- Size: 670 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# convertJsonCsv
Javascript module for convert formats json to csv and csv to json
[](https://www.npmjs.com/package/convert-json-csv)
## Install
```bash
npm install convert-json-csv
```## Tests
```bash
npm run test
```## Example
```javascript
var convert = require('convert-json-csv'),
csv2json = convert.csv2json,
json2csv = convert.json2csv;var csv = 'album, year, US_peak_chart_post \n' +
'Live at the Gold Dollar, 1999, - \n' +
'De Stijl, 2000, - \n' +
'White Blood Cells, 2001, 61 \n' +
'Elephant, 2003, 6 \n' +
'Get Behind Me Satan, 2005, 3 \n' +
'Icky Thump, 2007, 2 \n' +
'Under Great White Northern Lights, 2010, 11 \n' +
'Live in Mississippi, 2011, - \n' +
'The White Stripes, 2012, - \n' +
'Nine Miles from the White City, 2013, - \n';
csv2json(csv);
json2csv(JSON.parse(csv2json(csv));
```## License
MIT
## Donation Button
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YYZQ6ZRZ3EW5C)