/ Published in: Java
Iterating through a map in Freemarker. We have the tags ?keys and ?values which will give the keyset and valueset respectively. One thing we have to be carefull is if we have to use map[key] the key should be a string
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<#list map?keys as key> ${key} - ${map[key]} </#list>
URL: http://freemarker.org/docs/app_faq.html#faq_question_14