So having a dictionary in a var file, how would I find a value, if I don’t know the list position, but I do know a value of another key:value pair?
`
physical_interface_list:
- lan: 1
slave: no
route_list: - ip4: 1.1.1.1
subnet4: 2.2.2.2
gateway4: 3.3.3.3
present: yes
ip4: 4.4.4.4
dev_name: eth1
`
So if know that my variable lives somewhere in
`
physical_interface_list[?][‘ip4’]
`
And I know that the dev_name is eth1, how would I go about finding ip4 at the correct array position (assuming there are more than the one I am showing)? The variable file I am pulling from is enormous, and I have committed the 6 levels above it for brevity’s sake.
I have tried using map, but I must not understand how to use it correctly, and the documentation I have been reading doesn’t really tell me if it can be used that way…