I have data as a struct with several layers, for example:
data.A.B
The data I want to access is in layer B
. But the problem is that field names in B
can be different depending on where the data comes from. Therefore I can't just type:
data.A.B.myData
myData
is itself a struct
I can use:
fieldnames(data.A)
to find the names, but this doesn't help my much. I would have to write code sections for every possible field name that can occur at this level. And that's just what i trying to avoid.
Is there a way to get down to the data I have (myData
) without knowing the field names of B
?