How to query Azure CLI command output using a JMESPath query

August 26, 2025 ยท View on GitHub

The Azure CLI uses the --query parameter to execute a JMESPath query on the results of commands. JMESPath is a query language for JSON, giving you the ability to select and modify data from CLI output.

All commands in Azure CLI support the --query parameter. This article covers how to use the features of JMESPath and gives examples of queries. Learn about JMESPath concepts that are useful for querying under the concepts tab. See examples of JMESPath queries under the examples tab.

Concepts

[!INCLUDE Query Concepts]

Examples

[!INCLUDE Query Examples]


Next steps

To learn more about JMESPath queries, see JMESPath Tutorial.

To learn more about other Azure CLI concepts mentioned in this article see: