Build a command line script in Node to take a CSV file and stores it as JSON. Must be built in Node. Bonus if you are using streams.
First run the command npm i to install the packages associated with the project (i.e. csv-parser, fs, JSONStream, path)
Please note that the input.csv file was borrowed from https://stats.govt.nz/large-datasets/csv-files-for-download/ This is a site affiliated with the NZ goverment and it is the first CSV file you'll see listed as "Annual enterprise survey: 2021 financial year (provisional) โ CSV." Feel free to choose other data sets.
The output.json file was kept in this repo for your convenience so you can see what the output will actually look like. Feel free to delete this file because once you run the below command it will automatically be regenerated locally for you.
Run node csv-to-json.js in terminal to see the output json