JSON-CSV converter
This simple library convert JSON to CSV and CSV to JSON
JSON to CSV
let converter=jsonObject";"converter //return a promise
In JSONtoCSV
the first argument must be an array of JSON objects
CSV to JSON
let converter=csvString";"converter //return a promise
CSVtoJSON accept as third argument the path of a CSV file
In both JSONtoCSV and CSVtoJSON the second argument is the delimiter for CSV, the default one is ,
(coma).
Example
const JSONtoCSV = let jsonObject= NAME: "Luke" AGE: 20 NAME: "Fernando" AGE: 41let converter=jsonObject";"converter