jmespath / jmespath/jmespath.site

How to filter a dictionary with `contains`?

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

Description

```
{
"group1": {
"users": ["user1", "user2", "user3"]
},
"group2": {
"users": ["user1", "user2"]
},
"group3": {
"users": ["user3"]
}
}
```

How to get groups which contain `user3`, i.e. `["group1", "group3"]`?

I know about the `| keys(@)` pipe, but the question is how to filter a dictionary?

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.