jmespath / jmespath/jmespath.site

multiselect hash from nested dict without knowing key names doable?

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Makefile
Stars
61
Forks
61
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.