title: Twig: Key "0" does not exist as the array is empty but dump show array
body: <p>I have a problem in Twig trying to show an array.</p>
  
  <p>When I dump the variable <code>{{ dump(perfilServidor) }}</code>, I get:</p>
  
  <pre><code>array:3 [▼
    0 =&gt; UypPerfilServidor {#6122 ▼
      -id: 1
      -idPerfil: 8
      -uypPerfil: UypPerfil {#363 ▶}
      -uypServidor: UypServidor {#6118 ▶}
    }
    1 =&gt; UypPerfilServidor {#6117 ▼
      -id: 2
      -idPerfil: 8
      -uypPerfil: UypPerfil {#363}
      -uypServidor: UypServidor {#6116 ▶}
    }
    2 =&gt; UypPerfilServidor {#6114 ▼
      -id: 3
      -idPerfil: 8
      -uypPerfil: UypPerfil {#363}
      -uypServidor: UypServidor {#6115 ▶}
    }
  ]
  </code></pre>
  
  <p>But when I try to dump one key of the array <code>{{ dump(perfilServidor[0]) }}</code>, it throws an Exception:</p>
  
  <blockquote>
    <p>Key "0" does not exist as the array is empty</p>
  </blockquote>
  
  <p>And if I try to access another key, <code>{{ dump(perfilServidor[5]) }}</code>, it says that the array have the keys 0,1,2:</p>
  
  <blockquote>
    <p>Key "5" for array with keys "0, 1, 2" does not exist</p>
  </blockquote>
  
  <p>I want to get one specific value of the array (without looping through the whole array) How do I get the values of the array without looping through it?</p>