complex loop in playbook

Hi Guys,

hope someone can guide me here!

i succesfully get facts from my IOS-XR PE

ansible_facts:
interfaces_ip:
GigabitEthernet0/0/0/2.1004:
ipv4:
172.24.70.157:
prefix_length: 30
GigabitEthernet0/0/0/2.1031:
ipv4:
10.255.72.253:
prefix_length: 30

i’ve played with some of the example given here > http://docs.ansible.com/ansible/playbooks_loops.html but without success

how can i get the interface (3rd Level) linked to an IP adress (5th Level) i already know (from host_vars)

thanks in advance!

\ Francois

maybe json_query will do the trick: https://docs.ansible.com/ansible/playbooks_filters.html#json-query-filter