How to render an array to twig I've a block with values in the following array structure.

        $block['tag'][] = $term;
        $block['image'][] = $url;
        $block['title'][] = $title;
        $block['description'][] = $description;


From the function build in block, I'm passing it to theme as

$build = [
      '#theme' =&gt; 'allofus_four_grids_block',
      '#test_var' =&gt; $this-&gt;t('Test Value'),
      '#doubles' =&gt; array('key' =&gt; $block),
    ];


Then inside the module, I'm passing it to twig as 

'allofus_four_grids_block' =&gt; [
      'variables' =&gt; [
        'block' =&gt; array('key' =&gt; array()),
      ],
      'path' =&gt; drupal_get_path('theme', 'basis') . '/templates/custom-blocks',
    ],


And in the twig I'm iterating it as 

{% for key,value in block %}
    Key : {{ key }}
    Value : {{ value }}
    {% for key,text in value %}
        Key : {{ key }}
        Value : {{ text }}

    {% endfor %}

{% endfor %}


But this is not giving me the values?
Here you declare 

'allofus_four_grids_block' =&gt; [
      'variables' =&gt; [
        'block' =&gt; array('key' =&gt; array()),
      ],
      'path' =&gt; drupal_get_path('theme', 'basis') . '/templates/custom-blocks',
    ],


So you need to use the variable block :

$build = [
      '#theme' =&gt; 'allofus_four_grids_block',
      '#test_var' =&gt; $this-&gt;t('Test Value'),
      '#block' =&gt; array('key' =&gt; $block),
    ];


Not #doubles