title: How can I get a specific map value from Thymeleaf?
body: <p>How can I get a specific map value from Thymeleaf?</p>
  <pre><code>        &lt;tr th:each=&quot;item : ${items}&quot;&gt;
              &lt;td th:each=&quot;element : ${item}&quot;&gt;
                     &lt;a th:text=&quot;${element['key']}&quot;&gt;anchor&lt;/a&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  </code></pre>
  <p>In the code above, all keys corresponding to an element are displayed.</p>
  <p>But what I want is to get <code>element['projectName']</code>.
  That is, I want it to be something like this:</p>
  <pre><code>        &lt;tr th:each=&quot;item : ${items}&quot;&gt;
              &lt;td th:each=&quot;element : ${item}&quot;&gt;
                     &lt;a th:text=&quot;${element['key']}&quot;
                          th:href=&quot;${element.get('projectName')}&quot;&gt;anchor&lt;/a&gt;
  
              &lt;/td&gt;
          &lt;/tr&gt;
  </code></pre>
  <p>The data type of items is <code>List&lt;Map&lt;String, Object&gt;&gt;</code>, and the values ​​in items are</p>
  <pre><code>        assertThat(innerItems.get(0).get(&quot;modelName&quot;)).isEqualTo(&quot;a&quot;);
          assertThat(innerItems.get(0).get(&quot;item&quot;)).isEqualTo(1);
          assertThat(innerItems.get(0).get(&quot;id&quot;)).isEqualTo(&quot;q&quot;);
          assertThat(innerItems.get(0).get(&quot;projectName&quot;)).isEqualTo(&quot;DefaultProject&quot;);
          assertThat(innerItems.get(0).get(&quot;user_poi_no&quot;)).isEqualTo(1);
  is.
  </code></pre>