Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 993 Bytes

how-to-convert-a-json-file-to-csv-with-csvkit.md

File metadata and controls

26 lines (17 loc) · 993 Bytes

How to convert a json file to csv with csvkit?

// plain

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

onelinerhub: How to convert a json file to csv with csvkit?