An API response or export is JSON; the person who needs to look at it wants a spreadsheet. JSON that is a list of similar objects maps neatly to rows and columns. Deeply nested data has no natural table shape, so nested values have to be flattened into extra columns or kept as text.
One JSON can produce several CSV files; when it does, they are offered together as a ZIP download.
A list of records becomes a table with one row per record. Nested keys turn into columns named like address.city, list items into columns like tags.0, and a key that only some records have leaves empty cells in the others. If the top level holds several lists of records, each becomes its own table, saved as a separate file; a document that is a single object becomes one row.