title: Best way to render a map in Grails
body: <p>I am new to groovy and grails, hence this simple doubt. I have a map like this: [0:[A,B,C,D], 1:[a,b,c,d]]. I want to display it as follows: <br> A: a<br>B:b<br>C:c<br>D:d <br><br> How do you display the data column wise? The .gsp I have now is shown below and all it does is display the values row wise.<br><br></p>
  
  <pre><code> &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta name="layout" content="main"&gt;
          &lt;title&gt;Parsed Map&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;      
          &lt;table&gt;
              &lt;g:each in="${myMap}" var="element"&gt;
                  &lt;tr&gt;
                      &lt;g:each in="${element.value }" &gt;
                              &lt;th&gt;${it}&lt;/th&gt;
                           &lt;/g:each&gt;
  
                      &lt;/tr&gt;
                  &lt;/g:each&gt;
          &lt;/table&gt;                
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Pointing me in right direction for understanding maps in groovy will also be appreciated. Thank you. </p>