title: How To Iterate HashMap in FreeMarker?
body: <p>I use this class to wrap the maps that i want see in html:</p>
  
  <pre><code>public class ChartTimes {
   String text;
   Map&lt;Integer,Integer&gt; groups_time;
  //other code
  
  public Map&lt;Integer, Integer&gt; getGroups_time() {
              return groups_time;
          }
  
  public String getText() {
      return text;
  }
         }
  </code></pre>
  
  <p>so i send to freemarker a list of my classes "ChartTimes"</p>
  
  <pre><code>List&lt;ChartTimes&gt; timechart_list = new ArrayList();
  
  //other code
  
  request.setAttribute("times", timechart_list);
  </code></pre>
  
  <p>this is the html code:</p>
  
  <pre><code>   &lt;#list times as time&gt;
                          ${time.text?html}
  
                           &lt;#list time.groups_time?keys as key&gt;
                          ${key} - ${time.groups_time[key]}
                          &lt;/#list&gt;
      &lt;/#list&gt;
  </code></pre>
  
  <p>But the output is this monster: </p>
  
  <pre><code> - { getClass - clone - 2 - = 3 - 0 put - 4 - , remove - get - equals - entrySet - 9 -    , class - class java.util.LinkedHashMap hashCode -
   keySet - size - clear - isEmpty - containsKey - values - empty -
   containsValue - toString - putAll - 0 - { getClass - clone - 2 - = 3 -
   0 put - 4 - , remove - get - equals - entrySet - 9 - 0 class - class
   java.util.LinkedHashMap hashCode - keySet - size - clear - isEmpty -
   containsKey - values - empty - containsValue - toString - putAll
  </code></pre>
  
  <p>instead of the maps that i want. i don't undertand why.</p>