How to retrieve Metafields mixed reference using liquid?

Hey guys,

I currently have:
metafield: product.custom.inclusions_optionals

inside that i have Mix reference to metaobjects: shop.metaobjects.inclusions / shop.metaobjects.optionals

I’m building a table on my products page to show inclusions and options but i’m struggling to reference the metaobjects inside the meta fields.

This code works but it gives me all incusions on all products, I need to use the meta fields inside the product to only show the inclusions related to that product.

{% for inclusion in shop.metaobjects.inclusions.values %}
    <p>{{ inclusion.title.value }}</p>
{% endfor %}

To display only the inclusions and options related to the current product, you need to access the metaobjects referenced in the product’s metafield product.custom.inclusions_optionals. Here’s how you can modify your code:

{% if product.metafields.custom.inclusions_optionals.value != blank %}
  {% for inclusion in product.metafields.custom.inclusions_optionals.value %}
    

{{ inclusion.fields.title.value }}

  {% endfor %}
{% endif %}

That doesn’t return anything

Found the issue don’t need the .fields. on the value

{% if product.metafields.custom.inclusions_optionals.value != blank %}
  {% for inclusion in product.metafields.custom.inclusions_optionals.value %}
    

{{ inclusion.title.value }}

  {% endfor %}
{% endif %}