Liquid iterator not working on metafield product list

I have a product list metafield that seems to be working, as I’m able to display its contents, however the liquid iterator doesn’t work on it.

The following code:

FOO
{% assign bundle_contents = product.metafields.my_fields.bundle_contents %}
{{ bundle_contents }}
BAR
{% for pr in bundle_contents %}
    foo
{{ pr.title }}
{% endfor %}

outputs this

FOO ["gid://shopify/Product/7607032742143","gid://shopify/Product/7607033528575","gid://shopify/Product/7607033987327","gid://shopify/Product/7607035134207"] BAR

Note that no instances of lowercase ‘foo’ are printed, however there are a number of products in the metafield product list.

Hi @Crystaln ,

Please change code:

{% assign bundle_contents = product.metafields.my_fields.bundle_contents %}

=>

{% assign bundle_contents = product.metafields.my_fields.bundle_contents.value %}

it will work fine

Thank you I somehow missed that in the docs last night. First time using metafields.