title: Looping through arrays inside an array in twig
body: <p>I am using twig for rendering my template. I have a multidimensional array and trying to list out that array. My array structure is as follows </p>
  
  <pre><code>Array [0] =&gt; Array
      (
          [name] =&gt; user1
          [email] =&gt; user2@gmail.com
          [company_id] =&gt; 136
          [photos] =&gt; Array
              (
                  [0] =&gt; Array
                      (
                          [id] =&gt; 2
                          [company_id] =&gt; 136
                          [photo] =&gt; 5af13c3287f66.jpeg
                      )
  
                  [1] =&gt; Array
                      (
                          [id] =&gt; 3
                          [company_id] =&gt; 136
                          [photo] =&gt; default.jpeg
                      )
            )
   [1] =&gt; Array
      (
          [name] =&gt; user2
          [email] =&gt; user2@gmail.com
          [company_id] =&gt; 137
          [photos] =&gt; []
      )
  </code></pre>
  
  <p>And in my view page displaying this like</p>
  
  <pre><code> {% for users in userlist %}
   &lt;tr&gt;
       &lt;td&gt;{{ users.name }}&lt;/td&gt;
       &lt;td&gt;{{ users.email}}&lt;td&gt;
       &lt;td&gt; #pic1 - if available &lt;/td&gt;
       &lt;td&gt; #pic2 - if available &lt;/td&gt;
    &lt;/tr&gt;
  </code></pre>
  
  <p>How can I loop through the second array and display its values if available. Please help</p>