csvkitHow to convert a json file to csv with csvkit?
csvkit is a suite of command-line tools for converting to and working with CSV, the king of tabular file formats. It can be used to convert a json file to csv with the following command:
in2csv filename.json > filename.csv
This will create a csv file with the same name as the json file.
Code explanation
in2csv
: This is the command used to convert a json file to csv.filename.json
: This is the name of the json file to be converted.>
: This is the output redirection operator, which redirects the output of the command to the specified file.filename.csv
: This is the name of the csv file to be created.
Helpful links
More of Csvkit
- How to convert a tsv file to csv with csvkit?
- How to split a csv file with csvkit?
- How to select specific columns with csvkit?
- How to remove duplicates with csvkit?
- How to reorder columns with csvkit?
- How to convert JSON to CSV using csvkit?
- How to convert a csv file to tab delimited with csvkit?
- How to sort a csv file with csvkit?
- How to rename a column with csvkit?
- How to merge columns with csvkit?
See more codes...