# \#jmespath

**URL:** https://forum.ansible.com/tag/jmespath/172.md

[Latest](https://forum.ansible.com/latest.md) · [Categories](https://forum.ansible.com/categories.md) · [Tags](https://forum.ansible.com/tags.md)

---

## [Using community.general.json\_query in vars/main.yml with an Ansible role and ansible-core 2.19.x](https://forum.ansible.com/t/using-community-general-json-query-in-vars-main-yml-with-an-ansible-role-and-ansible-core-2-19-x/44202)

<div class="topic-metadata">

**Author:** [@chris](https://forum.ansible.com/u/chris)\
**Replies:** 9\
**Last updated:** [August 5, 2025, 2:14pm UTC](https://forum.ansible.com/t/using-community-general-json-query-in-vars-main-yml-with-an-ansible-role-and-ansible-core-2-19-x/44202 "2025-08-05T14:14:28Z")

</div>

I have a Ansible PHP role which uses json\_query in the vars/main.yml file. With ansible-core prior to 2.19.x this has been fine but with 2.19.x it doesn’t work, I have created a minimal test case to demonstrate this. I…

---

## [Ssh-audit output and json\_query()](https://forum.ansible.com/t/ssh-audit-output-and-json-query/41380)

<div class="topic-metadata">

**Author:** [@DengelFred](https://forum.ansible.com/u/DengelFred)\
**Replies:** 1\
**Last updated:** [March 27, 2025, 7:24pm UTC](https://forum.ansible.com/t/ssh-audit-output-and-json-query/41380 "2025-03-27T19:24:44Z")

</div>

Hello, I would like to parse the output of ssh-audit -j automatically. The output looks like this (shortened): { "kex": \[ { "algorithm": "sntrup761x25519-sha512", "notes": { "info": \[ …

---

## [Help with json\_query filtering](https://forum.ansible.com/t/help-with-json-query-filtering/40789)

<div class="topic-metadata">

**Author:** [@Lyle\_McKarns](https://forum.ansible.com/u/Lyle_McKarns)\
**Replies:** 10\
**Last updated:** [March 5, 2025, 3:50pm UTC](https://forum.ansible.com/t/help-with-json-query-filtering/40789 "2025-03-05T15:50:30Z")

</div>

I’m pulling some information from Active Directory and trying to use json\_query to filter it, without success. I’ve written up equivalent code and mock data that reproduces my issue. using data from here with the follow…

---

## [Json\_query/jmespath help with JSON output of ansible-playbook execution](https://forum.ansible.com/t/json-query-jmespath-help-with-json-output-of-ansible-playbook-execution/39733)

<div class="topic-metadata">

**Author:** [@iamroddo](https://forum.ansible.com/u/iamroddo)\
**Replies:** 1\
**Last updated:** [January 21, 2025, 12:52pm UTC](https://forum.ansible.com/t/json-query-jmespath-help-with-json-output-of-ansible-playbook-execution/39733 "2025-01-21T12:52:44Z")

</div>

I am looking to do some meta analysis of the execution of a playbook by setting stdout\_callback = json in ansible.cfg and analysing the output. Specifically I’d like to extract a list of tasks and whether for each host …

---

## [Changing the dictionary key names but not values of items in a loop](https://forum.ansible.com/t/changing-the-dictionary-key-names-but-not-values-of-items-in-a-loop/3434)

<div class="topic-metadata">

**Author:** [@JethCalark](https://forum.ansible.com/u/JethCalark)\
**Replies:** 8\
**Last updated:** [January 28, 2024, 11:12pm UTC](https://forum.ansible.com/t/changing-the-dictionary-key-names-but-not-values-of-items-in-a-loop/3434 "2024-01-28T23:12:45Z")

</div>

I have a role for Adguard Home with a task to add DHCP reservations. That task requires a list variable where each item has the same dictionary keys: - name: Add static leases on AdGuard Home ansible.builtin.uri: …

---

## [Pragmatic approach to extract a value from my inventory data object](https://forum.ansible.com/t/pragmatic-approach-to-extract-a-value-from-my-inventory-data-object/2855)

<div class="topic-metadata">

**Author:** [@crc31](https://forum.ansible.com/u/crc31)\
**Replies:** 7\
**Last updated:** [December 18, 2023, 4:09pm UTC](https://forum.ansible.com/t/pragmatic-approach-to-extract-a-value-from-my-inventory-data-object/2855 "2023-12-18T16:09:13Z")

</div>

Hello everyone, I have a fairly large inventory data structure from which I need to extract a value within a playbook. I’m wondering if this is possible with native Ansible, for example, by directly applying a filter pl…

---

## [Filter the output with jmespath](https://forum.ansible.com/t/filter-the-output-with-jmespath/893)

<div class="topic-metadata">

**Author:** [@daemenseth](https://forum.ansible.com/u/daemenseth)\
**Replies:** 4\
**Last updated:** [October 6, 2023, 9:08am UTC](https://forum.ansible.com/t/filter-the-output-with-jmespath/893 "2023-10-06T09:08:00Z")

</div>

I have a playbook which install windows updates with win\_updates. The output is registred. See example output below. I want to filter that output with the result title,kb where the installed value is equal to true I w…

---

## [Checking that keys nested in a dictionary are unique using JMESPath (or not)](https://forum.ansible.com/t/checking-that-keys-nested-in-a-dictionary-are-unique-using-jmespath-or-not/736)

<div class="topic-metadata">

**Author:** [@chris](https://forum.ansible.com/u/chris)\
**Replies:** 3\
**Last updated:** [September 14, 2023, 9:32pm UTC](https://forum.ansible.com/t/checking-that-keys-nested-in-a-dictionary-are-unique-using-jmespath-or-not/736 "2023-09-14T21:32:21Z")

</div>

I have a PHP role that defines the versions of PHP to install and the FPM pools to configure and enable that looks something like this: php\_versions: 8.1: state: present pools: admin: state: pres…
