I’m a bit stuck on the following.
The following captures have the correct values. The problem arrises from the fact that the value of var_pageData is seen as a String instead of an Array I can loop over.
{%- capture var_pageID -%}{{ page.headline | downcase | replace: ' ', '-'{%- endcapture -%}
{%- capture var_pageData -%}site.data.{{ var_pageID }}.merchandise.products.available{%- endcapture -%}
{% for choice in var_pageData -%}
my item = {{ choice.item }} <br>
{% endfor %}
Thanks for your help.