Posted By

arunpjohny on 07/29/09


Tagged

Freemarker


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Ktoso


Iterating through a map in Freemarker


 / Published in: Java
 

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

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

  1. <#list map?keys as key>
  2. ${key} - ${map[key]}
  3. </#list>

Report this snippet  

You need to login to post a comment.