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' => 'allofus_four_grids_block',
'#test_var' => $this->t('Test Value'),
'#doubles' => array('key' => $block),
];
Then inside the module, I'm passing it to twig as
'allofus_four_grids_block' => [
'variables' => [
'block' => array('key' => array()),
],
'path' => 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?