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

NameTypeRequiredDefaultDescription
datastringyesJSON data string or data structure to query
querystringyesQuery 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"