title: How can I use a dynamic key/value on a second level in twig?
body: <p>This is my <code>group</code> array:</p>
  
  <pre><code>array:4 [▼
    0 =&gt; Fields {#7444 ▼
      -id: 1
      -name: "ID"
      -unique_id: "6ab8c870ed"
      -productgroup: PersistentCollection {#7448 ▶}
      -type: Type {#7525 ▼
        +__isInitialized__: true
        -id: 2
        -name: "hidden"
        -unique_id: "5e1086c862"
        -label: "hidden"
         …2
      }
    }
    1 =&gt; Fields {#7526 ▶}
    2 =&gt; Fields {#7530 ▶}
    3 =&gt; Fields {#7534 ▶}
  ]
  </code></pre>
  
  <p>This is my <code>column</code> array:</p>
  
  <pre><code>array:3 [▼
    0 =&gt; "id"
    1 =&gt; "name"
    2 =&gt; "type"
  ]
  </code></pre>
  
  <p>I know that my id is 1:</p>
  
  <pre><code>$id = "1";
  </code></pre>
  
  <p>For each value in my column key I want to print out the according value from my <code>group</code> array.</p>
  
  <p>So the result would be:</p>
  
  <pre><code>1
  ID
  hidden
  </code></pre>
  
  <p>I try to achieve this with twig</p>
  
  <pre><code>{% for key, value in column %}
     {% for k, v in group %}
        {{ v.[value] }};
     {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Expected name or number.</p>
  </blockquote>
  
  <p>NOTE: This <a href="https://stackoverflow.com/questions/15606171/symfony2-twig-getting-array-from-dynamic-array-key">Symfony2 / Twig - getting array from dynamic array key</a> is not helping me, because it only explains how to use the value like this <code>v[value]</code> or this <code>v[key]</code> but not in the second level like this <code>v.[value]</code>. </p>