Splitting Metafield Value List / Product with multiple colors

I have a Color metafield:

  • Single Line
  • Value List

Where I want to put the product colors in.
Sometimes only one, sometimes 5 colors per product.

Now I want to display the color(s) to the customer in a single line seperated by a “/”.

This is the output if you render the metafield like :

{{ product.metafields.custom.color.value }}

1.jpg

Both tags have no space in-between

And this is the output if I´m trying to use the “Split” function:

{{ product.metafields.custom.color.value | Split:“/” }}

2.jpg

Why does it render the “(” brackets?

This is how the metafield is set up

The Code that renders the Color Variant:

{{ block.settings.heading }} Farbe:  {{ product.metafields.custom.color.value }}

Any ideas how to solve my issue?

Of course you can do something like this:

{{ product.metafields.custom.color.value | remove: “[” | remove: “]” | remove: ‘"’ | split: “/” }}

But at the end the “/” still does not work and will only render a “,”:

Bildschirmfoto 2024-02-01 um 16.53.36.jpg

Bump!