How to do parameterized ansible-variable attribute-lookups?

This is best explained by this simple example: