json_query
Collection: community.general
Full Name: parallax.community.general.json_query
Aliases: community.general.json_query, json_query
Controller module — runs on the local controller, not on remote hosts.
Synopsis
Query a structure with a JMESPath expression
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| data | string | yes | JSON data string or data structure to query | |
| query | string | yes | Query expression using dot notation (e.g. key.subkey, items[0].name) |
Example
- name: Extract the running container names
json_query:
data: "{{ containers }}"
query: "[?State=='running'].Name"