jmespath.site
jmespath.site copied to clipboard
multiselect hash from nested dict without knowing key names doable?
Hello
I'd really appreciate some help with the following structure
[ {"a": [ { "b": { "foo": { "c": { "bar": { "value": "123" } } } } } ] } ]
Where I know the names of all the keys except for foo and bar, and would like to return those key names when 'value'=='123'
i.e. something like
[].a[0].b.[@1].c.[@2].[?(value=="123")].{ firstkey: @1.key, secondkey: @2.key }
No idea if what I'm asking is possible.