mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
28 lines
677 B
Markdown
28 lines
677 B
Markdown
# JMESPath
|
|
|
|
## TL;DR
|
|
|
|
```sh
|
|
# Filter elements in a list.
|
|
az devops user list --org 'https://dev.azure.com/organizationName' \
|
|
--query "
|
|
items[?
|
|
startsWith(user.principalName, 'yourNameHere') &&
|
|
\! contains(accessLevel.licenseDisplayName, 'Test plans')
|
|
].user.displayName"
|
|
|
|
# Print an object with specific keys and values from the input.
|
|
az disk-encryption-set show --ids 'id' \
|
|
--query "{
|
|
\"keyId\": activeKey.keyUrl,
|
|
\"accessPolicyId\": join('/', [activeKey.sourceVault.id, 'objectId', identity.principalId])
|
|
}"
|
|
```
|
|
|
|
## Further readings
|
|
|
|
- [Website]
|
|
|
|
[specifications]: https://jmespath.org/specification.html
|
|
[website]: https://jmespath.org/
|