Assign where dictionary key exists in a nested dictionary - possible?

Thanks for the reply, but writing a function (I took a look at DSL: Flatten a nested dictionary with a function for apply for rules) would complicate things rather than making it easier.
Unless you have a straightforward example of such a function at hand? :wink:

Oh and I can’t use “if” inside the apply rule because it is managed by puppet-icinga2.