I have a weird JSON construct (I cannot provide the actual data for security reasons, but I can provide the structure, which is all that really matters).
Given the following structure:
[
{
"a": {
"b": {
"c": "d"
}
}
},
{
"b": {
"c": "d"
}
},
]
I need to have a way to always get to c
without knowing if the path contains a
or not. Something like:
[].*.b.c.d
or
[].a?.b.c.d
Any ideas?
For reference, I am using the jmespath library for python.