JSON records to CSV rows
For JSON-to-CSV conversion, each member of the top-level array is treated as a source record. Object keys provide the available fields, and the column mapping determines which field feeds each CSV column. Values from successive records then occupy rows beneath those headers. Records with missing, extra, or differently ordered keys require attention because a rectangular CSV table cannot preserve every structural distinction among heterogeneous JSON objects.