jmespath / jmespath/jmespath.site
Flatten projections with data fields from parent object containing the list
- Dominant language
- Makefile
- Stars
- 61
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
``` javascript
{
"reservations": [
{
"instances": [
{"type": "small",
"state": {"name": "running"},
"tags": [{"Key": "Name",
"Values": ["Web"]},
{"Key": "version",
"Values": ["1"]}]},
{"type": "large",
"state": {"name": "stopped"},
"tags": [{"Key": "Name",
"Values": ["Web"]},
{"Key": "version",
"Values": ["1"]}]}
]
}, {
"instances": [
{"type": "medium",
"state": {"name": "terminated"},
"tags": [{"Key": "Name",
"Values": ["Web"]},
{"Key": "version",
"Values": ["1"]}]},
{"type": "xlarge",
"state": {"name": "running"},
"tags": [{"Key": "Name",
"Values": ["DB"]},
{"Key": "version",
"Values": ["1"]}]}
]
}
]
}
```
I wish to select all tags as a flat list from above data:
reservations[].instances[].tags[]
However, I wish to select the "state" information of each instance as a key inside each tag object too. Could you please tell me how to achieve this.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.