jmespath / jmespath/jmespath.js
Default value needed if key not exist inside some object in array of objects
Open
- Dominant language
- JavaScript
- Stars
- 847
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I am looking for a solution where my data is
`[
{
"name": "rahul",
"email": "rahul@domain.com"
},
{
"name": "amit",
"email": "amit@domain.com"
},
{
"email": "divyesh@domain.com"
},
{
"name": "brijesh",
"email": "brijesh@domain.com"
}
]`
Note: name key is missing in third object
query: `[].name`
result:
`[
"rahul",
"amit",
"brijesh"
]`
expected result:
`[
"rahul",
"amit",
"",
"brijesh"
]`
please help
Thanks
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.