Problem: Developers are struggling to extract values from Shopify metaobject lists in Liquid templates. Standard iteration methods return nothing or produce errors like “operation not allowed for this object.”
Root Cause: The metaobject list requires specific syntax to access its values—direct iteration or standard .value calls don’t work as expected.
Solution Found:
Use product.metafields.sp_custom.size_chart_metaobjects.value['size_chart_metaobjects'] to access the metaobject list
Apply a for-loop to iterate through specific values: {% for prod in product.metafields.sp_custom.size_chart_metaobjects.value['size_chart_metaobjects'] %}
The | json filter can help with debugging to visualize the data structure
Status: Multiple users confirmed the solution works after being stuck on this issue for extended periods. The problem appears resolved with the correct bracket notation syntax for accessing metaobject list values.
Summarized with AI on November 4.
AI used: claude-sonnet-4-5-20250929.
it looks so simple thing but can’t get the values of the metaobject when it is selected “List of values”.
I thought I have to once again iterate it. But it returns nothing. It is really frustrating debugging when not getting any errors.
{% assign myfields = product.metafields.sp_custom.size_chart_metaobjects.value %}
{{ myfields }}
// it return MetaobjectDrop
{% for m in myfields.sizes %}
{{m.value}} //nothing works
{{m[0].value}} //nothing works
{% endfor %}
or
{% for m in myfields %}
{% for s in myfields.sizes %}
{{ s }} //nothing works
{{ s.value }} //nothing works
{{ s[0].value }} //nothing works
{% endfor %}
{% endfor %}