How are nested objects turned into columns?
Each level adds its key after a dot: {"address": {"city": "London"}} gives a column named address.city. A record without that key leaves the cell empty, so every row has the same columns.
What if the records have different keys?
Every key met in any record becomes a column, in the order first seen. Two records {"name": "Ada", "age": 36} and {"name": "Bo", "phone": "+44"} give three columns, with Ada’s phone and Bo’s age left empty.
Can I turn the CSV back into JSON?
Yes, save as JSON instead, as objects, arrays or JSON Lines. The columns stay flat, though: address.city comes back as one key with a dot in it, not as an object.