title: Iterating over map in Freemarker
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1497777/freemarker-iterating-over-hashmap-keys">Freemarker iterating over hashmap keys</a>  </p>
  </blockquote>
  
  
  
  <p>I have a Hash Map which contain item ids as a key and Item objects as a value. Following is the pseudo code -</p>
  
  <pre><code>allItems : {
    12: itemObj1 (id:12, name:myitem1)
    13: itemObj2 (id:13, name:myitem2)
    14: itemObj3 (id:14, name:myitem3)
  }
  </code></pre>
  
  <p>On result.ftl I need to iterate over this map and get the values of Item Object. I have tried this approach but could not get values from Item object -</p>
  
  <pre><code>&lt;#list item?keys as it&gt;
      ${it} = ${item.get(it)[name]}
  &lt;/#list&gt;
  </code></pre>