Use the "JSON | Convert JSON to CSV file..." command to convert JSON input to CSV tables. This command is enabled after selecting a file in the built-in "File Explorer" or an active document is loaded on the Editor tab. To start the conversion a dialog is opened that offers various options in a convenient way:
Take only top-level objects
Only JSON objects from the root level are taken to generate the CSV output. Can also be used if the top-level value is a JSON array.
If not the complete JSON should be converted to CSV this option can be used to set a JSON pointer to set the location where the conversion process should start.
This button is enabled if the current document is converted to CSV and a valid JSON pointer for the current selection is available. On clicking this button the current JSON pointer is copied to the JSON pointer field
Select this option to convert the complete JSON with all child objects and values. The column labels are then JSON pointers pointing to the related values relative to the starting level of the JSON input. Please take a look at the List of JSON values and the CSV preview to get a better idea how the JSON is converted to CSV in this case.
This list contains all of the JSON values which will be converted to CSV. You can add values using the Add and Remove buttons. The column labels are actually JSON pointer fragments relative to the starting level within the JSON input.
In general the conversion process takes all JSON objects it can find at a specific location in the JSON document. This location can be the root of the JSON data or any other valid JSON pointer.
A list of JSON values is updated whenever the starting location of the conversion process is changed. This list can also be used to change the order in the CSV output, to remove values from the output and to add values which were not detected automatically. Use the "Remove" button to skip a JSON value in the CSV output. In order to move a value up or down select the value from the list and use the "Up" or "Down" buttons.
The "Take from selection" button is enabled if the dialog was opened from an active document on the Editor tab. In this case the JSON pointer location is taken from the current selection in the JSON data.
To generate the actual output use the "Convert" button. This will open a new document in the editor with the conversion results as CSV. Afterwards you can save the CSV data with the standard "File | Save" command.
Error reporting
It can happen that not all of the JSON input can be converted to CSV. For example, the JSON input could have syntax errors at a specific line. Any available CSV output is written to a new document and the standard "Results" window of the application will then display all of the reported errors. Please note that not all of the JSON input is converted in this case.