diff --git a/knowledge base/jmespath.md b/knowledge base/jmespath.md new file mode 100644 index 0000000..39dff19 --- /dev/null +++ b/knowledge base/jmespath.md @@ -0,0 +1,21 @@ +# JMESPath + +## TL;DR + +```sh +# Filter elements in a list. +az devops user list \ + --org https://dv.azure.com/organizationName \ + --query "\ + items[? \ + startsWith(user.principalName, 'yourNameHere') && \ + \! contains(accessLevel.licenseDisplayName, 'Test plans') \ + ].user.displayName" +``` + +## Further readings + +- [Website] + +[specifications]: https://jmespath.org/specification.html +[website]: https://jmespath.org/