How can I access metaobject values in product metafields?

Hi guys, I’m having a similar issues and don’t understand what I’m doing wrong.

I have a customer metafield containing list of metaobjects. The metafield has namespace custom and key license_new and it references a metaobject of type license which has 2 fields:

  1. reference_product: reference to the product.
  2. license_files: a list of generic files.

I want to display the list of metaobjects, specifically a link to the reference_product and links to download the related license_files, in the customer account page. I’m attempting to do so using

{% assign licenses = customer.metafields.custom.license_new.value %}
      {% for license in licenses %}
        {{ license.reference_product.value }} 

      {% endfor %}

This doesn’t seem to work and I don’t understand why.

I tried a similar approach with a simpler metafiled of key licenses that only contains a list of generic files. If I try to display the files IDs by doing

{% assign licenses = customer.metafields.custom.licenses.value %}
      {% for license in licenses %}
        {{ license.id }} 

      {% endfor %}

everything works as expected.

Can anyone see what I’m doing wrong? Thank you :slightly_smiling_face: