I'm trying to write JMESPath for following structure:
{
"example": [
{
"field": "value",
"lst": [
{
"inner_field": "fvalue"
}
],
}
]
}
The result I'm looking for is
[
{
"inner_field": "fvalue",
"field": "value"
}
]
With field
being inserted into all dictionaries in lst
.
I'm aware of things like:
example[*].{field: field, lst: lst}
But is there a way to assign field
for each element in lst
?