Hi,
I have a question about dynamic content where a part of a field key is not known and how it can be referenced, using two examples.
In this first example, it is easy to get the required data using dynamic content from a looper using the following DC:
For this example I use the DC:
{{dc:looper:field key="name.common"}}
and get the correct country displaying.
However, in the next example, the three letter currency code will change from country to country.
If I use DC: {{dc:looper:field key="currencies.PGK.name"}}
I get the expected result of Papua New Guinean kina
. If I use: {{dc:looper:field key="currencies.USD.name"}}
the result will be United States dollar
.
However, as “PGK” or “USD” will be different for every country, is there a way of using a wildcard or regex in the DC to be able to get the correct three letters? I have tried things like: {{dc:looper:field key="currencies.*.name"}}
but cannot find a way to get hold of the data.
Any ideas would be welcome,
Christopher