chore(jmespath): add contain() examples

This commit is contained in:
Michele Cereda
2025-01-18 00:32:49 +01:00
parent 43f856b3f4
commit d416a27382

View File

@@ -4,6 +4,7 @@
1. [TL;DR](#tldr)
1. [Further readings](#further-readings)
1. [Sources](#sources)
## TL;DR
@@ -14,7 +15,10 @@ az devops user list --org 'https://dev.azure.com/organizationName' \
items[?
startsWith(user.principalName, 'yourNameHere') &&
\! contains(accessLevel.licenseDisplayName, 'Test plans')
].user.displayName"
].user.displayName
"
aws … --query "locations[?name.contains(@, `le`)]"
aws … --query "locations[?name.contains(@, `ue`) || name.contains(@, `ia`)]"
# Print an object with specific keys and values from the input.
az disk-encryption-set show --ids 'id' \
@@ -27,11 +31,20 @@ az disk-encryption-set show --ids 'id' \
## Further readings
- [Website]
- [Specifications]
### Sources
- [Filtering JMESPath with contains]
<!--
References
Reference
═╬═Time══
-->
<!-- Upstream -->
[specifications]: https://jmespath.org/specification.html
[website]: https://jmespath.org/
<!-- Others -->
[filtering jmespath with contains]: https://stackoverflow.com/questions/50774937/filtering-jmespath-with-contains#50831828