- Clone this repository
- Run
npm installto get dependencies - Run
npm install g .to install the CLI tool itself as a console command - Now you can use the CLK JsonToCsv tool!
Run jsontocsv with the following args:
-u (URL Endpoint)
-k (The key used to extract data from JSON response)
-o (Use double quotes. Output path to drop the CSV file (defaults to current directory - Im not being lazy))
-f (CSV file name (No .ext. Defaults to csvFromJson.csv))
Example
jsontocsv -f mi_file -k data -u "https://jsonplaceholder.typicode.com/todos/1"