Converts CSV to JSON, and vice versa.
Vanilla JS, no dependencies.
Either install it globally:
npm install -g @javarome/csv4json
or locally:
npm install @javarome/csv4json
csv4json --input <csv or json file> --output <json or csv file>
const converter = new Csv4Json('../test/input.csv', '../test/output.json', ',', '\n')
converter.run().then(result => {
console.log('Written', result)
})
const converter = new Csv4Json('../test/input.csv', '../test/output.json', ',', '\n')
converter.run().then(result => {
console.log('Written', result)
})