A tree has to be squeezed into a grid
JSON is hierarchical and CSV is flat, so this conversion is a genuine change of shape rather than a change of syntax. The mechanism is flattening: nested paths become column headers, so `{"user":{"city":"Oslo"}}` produces a column called `user.city`. Every leaf value in the document needs its own column.
That works cleanly when the JSON is an array of uniform, shallow objects, which is the case CSV was designed for - one object per row, one field per column. It works less well the further you get from that shape, and understanding why saves a lot of frustration.
The awkward case is nested arrays. A user with three phone numbers has to become either three columns (`phones[0]`, `phones[1]`, `phones[2]`) or three rows, and neither is obviously right. Columns break as soon as someone has four numbers. Rows duplicate every other field. There is no third option, because the mismatch is structural.