Return to Snippet

Revision: 16216
at July 29, 2009 06:24 by arunpjohny


Initial Code
<#list map?keys as key>
    ${key} - ${map[key]}
</#list>

Initial URL
http://freemarker.org/docs/app_faq.html#faq_question_14

Initial Description
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

Initial Title
Iterating through a map in Freemarker

Initial Tags


Initial Language
Java