nodejs csv to json from link 1

nodejs csv to json from link

// npm install --save csvtojson@latest
const csv = require("csvtojson");
const request = require('request');
// Convert a csv file with csvtojson
  		//when parse finished, result will be emitted here.

Here is what the above code is Doing:
1. We’re using the csvtojson package to convert a csv file to json.
2. We’re using the request package to make a request to the url of the csv file.
3. We’re using the fromStream method to convert the csv file to json.
4. We’re using the then method to log the jsonArrayObj to the console.

Similar Posts