You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@onelastjedi/json2csv

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onelastjedi/json2csv

Parse JSON to CSV and vice versa in its simplest form

1.0.5
latest
Source
npmnpm
Version published
Weekly downloads
63
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

json

FAQs

Package last updated on 22 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts