First have NodeJS installed. If it's isn't the case, you can download it on the official website
Then install my node_module with
npm install csv-to-custom-json
Caption :
npm
stands forNode Packet Manager
, it can be used to downloadnode_modules
csv-to-custom-json
is the name of thenode_modules
Then if you want to use it, you can for example copy and paste this code :
const converter = require("csv-to-custom-json")
const result = await converter("myfile.csv");
Caption :
- the name
myfile.csv
can be different, just change it with the correct name of your file
Now you are ready to check Options !
npm install -g csv-to-custom-json
# or direcly execute it with npx
npx csv-to-custom-json
If the package is installed as a node_modules
, you can use CLI with a npm script
Here is the package.json
{
...
"scripts": {
"cli": "csv-to-custom-json YOUR_OPTIONS..."
},
...
}
Caption :
- You can now run it with
npm run cli
- You can change
YOUR_OPTIONS...
with corrects options
You can use the command
csv-to-custom-json YOUR_OPTIONS...
Caption :
- You can change
YOUR_OPTIONS...
with corrects options