Use twig Var in for loop the var menutype is set to {{ menutype }}

{% for block in menutype.menuGlobal %}


I'm trying to pass the result of {{ menutype }} into the for loop to return a dynamic menu, but the loop doesn't run. Hardcoding the string works, so the loop is fine, just appears not to recognise the variable output in the for statement.
Please try the following code:

{% set dynamicMenu = menutype~".menuGlobal" %}

{% for block in dynamicMenu %}
.
.
.
{% endfor %}