title: Spring with Thymeleaf - Display Array of Roles in UI
body: <p>I'm having some learning pains trying to get user roles to display in my UI. The UI is <code>Thymeleaf</code>.</p>
  <p>I have the following which does display the first item in the array:</p>
  <pre><code>&lt;tr th:each=&quot;appuser: ${appuser}&quot;&gt;
      &lt;td th:text=&quot;${appuser.id}&quot;&gt;&lt;/td&gt;
      &lt;td th:text=&quot;${appuser.firstName}&quot; /&gt;
      &lt;td th:text=&quot;${appuser.lastName}&quot; /&gt;
      &lt;td th:text=&quot;${appuser.email}&quot; /&gt;
      &lt;td th:text=&quot;${appuser.roles[0].name}&quot; /&gt;
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;&lt;a class=&quot;btn btn-primary&quot;
          th:href=&quot;@{/edit/{id}(id=${appuser.id})}&quot;&gt;Edit&lt;/a&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  <p>The array of user roles is where I'm having some issue. How would I display the array in a foreach?</p>