Cant get product metafield type

Solved
Dima34
Shopify Partner
12 0 1

Dima34_0-1698089758678.png

Can`t get metafield type. 

Dima34_1-1698089805188.png

What I do wrong?

Accepted Solution (1)
Liam
Shopify Staff
Shopify Staff
1942 206 585

This is an accepted solution.

Hi Dima34,

 

I was able to output the content type in this loop:

 

{% for metafield in product.metafields.namespace.key.type %}

  {{ metafield }}

{% endfor %}

 

eg:

 

Would this approach work for you?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)
Liam
Shopify Staff
Shopify Staff
1942 206 585

This is an accepted solution.

Hi Dima34,

 

I was able to output the content type in this loop:

 

{% for metafield in product.metafields.namespace.key.type %}

  {{ metafield }}

{% endfor %}

 

eg:

 

Would this approach work for you?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Dima34
Shopify Partner
12 0 1

That helped) Thank you