Expand my Community achievements bar.

Take 10 minutes to complete an Adobe Target review on Gartner Peer Insights, and as a thank you for your time, you’ll have the option to receive a $25 gift card!

Map in Velocity

Avatar

Level 3

Hi, I have a map 

#set ($mymap={"keyname":"value1,value2"})

The key name will be dynamic in my case, hence tried

"$mymap[$dynamickeyname]" where $dynamickeyname evaluates to keyname. But throws a parse error.

It is not working in the target's velocity template.

I have tried $!mymap.get("$!dynamickeyname") as well which is not working either.

Can you please assist with the right syntax to retrieve the map values dynamically.

 

0 Replies