I'm trying to find a way to get all the names from the people list, without have to specify the path. Is there a way to do this in JMESPath. i.e without having to step down multiple paths.
I.e.: I want to grab a list of all the names.
{
"country": {
"people": [
{
"age": 20,
"name": "Bob"
},
{
"age": 25,
"name": "Fred"
}
]
}
}
In the world of JSONata this would be:
**.name
# which would give you ...
[
"Bob",
"Fred"
]
Based on: jmespath how do I find the key values in the dictionary? it appears this cannot be done.