What JSON to CSV conversion actually does
CSV is a flat, two-dimensional format: one header row of column names, then one row per record. JSON is a tree. The conversion only makes sense when your JSON is a list of records with the same rough shape — a JSON array of objects — where each object maps naturally onto a row and each key onto a column. JSON Copilot takes that array, walks every object once to collect the column names, then emits one CSV line per object.
Concretely, an input like [{"id":1,"name":"Ada"},{"id":2,"name":"Alan"}] becomes a header of id,name followed by 1,Ada and 2,Alan. The column order follows the order keys first appear while scanning the array, not alphabetical order, so the CSV reads the way your objects are written. Numbers and booleans are written as-is (1, true), and strings are written literally, only getting quotes when they actually need them.
If you pass a single object instead of an array, it is treated as a one-row table. If you pass an array of plain values such as ["a","b","c"], there are no keys to become columns, so the output is a single column named value with one row per element. That keeps the tool predictable no matter exactly how your data is shaped.