Skip to content

danielrod99/csv-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

CSV Manager

Usage

npm install csv-manager

Import the package

const csv_manager = require('csv-manager');

JSON to CSV converter

Convert your json variable into a csv file.

csv_manager.toCSV(jsonArray,separator,path);

And your csv file will be saved in the path you wrote!

Example

Having the json array

var people=[
    {name: 'Bruce', surname: 'Wayne'},
    {name: 'Clark', surname:'Kent'},
    {name: 'Peter', surname: 'Parker'}
]

Use the function toCSV() to get your CSV file, using the separator you want, in this example we are using comma (,)

csv_manager.toCSV(people, ',' ,'people.csv');

And your CSV file will be ready!

About

Convert JSON variables into CSV files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published