jmespath / jmespath/jmespath.site

Multiple conditions and nested data

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

Description

Hi. I would like to get help with this query.

> if company_info.active = TRUE and company_info.company_employees.salary > 4200

The response im searching for is this:

```
[
{
"company_id": 3,
"company_info": {
"active": true,
"company_employees": [
{
"id": "1",
"name": "Charlotte Doe",
"salary": "4500"
},
{
"id": "2",
"name": "Chris Doe",
"salary": "5200"
}
]
}
}
]
```

Here is example from the full object.

```
[
{
"company_id": 1,
"company_info": {
"active": true,
"company_employees": [
{
"id": "1",
"name": "John Doe",
"salary": "2500"
},
{
"id": "2",
"name": "Liza Doe",
"salary": "3200"
}
]
}
},
{
"company_id": 2,
"company_info": {
"active": false,
"company_employees": [
{
"id": "1",
"name": "Jacob Doe",
"salary": "6500"
},
{
"id": "2",
"name": "Hanna Doe",
"salary": "8200"
}
]
}
},
{
"company_id": 3,
"company_info": {
"active": true,
"company_employees": [
{
"id": "1",
"name": "Charlotte Doe",
"salary": "4500"
},
{
"id": "2",
"name": "Chris Doe",
"salary": "5200"
}
]
}
}
]
```

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.