I'm struggling to flatten a JSON schema that has structs inside structs. The problem is that the inner structs names are dynamic so I can't access them easily using "." notion
The schema is similar to :
root
|-- A: string (nullable = true)
|-- Plugins: struct (nullable = true)
| |-- RfS: struct (nullable = true)
| |-- A
| |-- B
| |-- RtW: struct (nullable = true)
| |-- A
| |-- B
so As and Bs are fixed, but every JSON file has different number structs with different names (RfS,RtW) .. could be 2 .. could be 5 .. with dyanmic names that I don't know.
How can I flatten this structure easily in a dynamic way ?