Nested objects lookup based on property value


I’m trying to extract data from the OpenStreetMap API, and I am having difficulties with properties sharing the same name in different sub-objects:

Let’s say I want to read the house number and the street name. Both are properties named “localname”. However the sub-objects they are nested in can be differentiated with the “type” property:



What would be the formula to read any one of these values?

Thank you