Accessing metafields

When doing this:

{{ product.metafields.custom.color_and_slug }}

This is the output:

["gid://shopify/Metaobject/125980836177","gid://shopify/Metaobject/126178918737"]

The metaobject is made of two types. a product and a color.

How can i access the information about them?

Nothing seems to work.

The best was doing this to get the single value:

{% assign color_and_slug = product.metafields.custom.color_and_slug | join: ',' | split: ',' %}

{% for metaobject_id in color_and_slug %}
{% assign cleaned_metaobject_id = metaobject_id | replace: '["', '' | replace: '"]', '' | replace: '"', '' %}
<p>Metaobject ID: {{ cleaned_metaobject_id }}</p>
{% endfor %}

For for the single values now i don’t see anyway to access the metafields from liquid