Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have the task, i need to extract the value from metafield of the product:
When I display the whole metafield>
{{ product.metafields.product.passform}}
it shows me the following> {"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Test"}]}]}
how can I display only the value, which is "Test" in this case?
I found the solution:
{% assign jsonData = product.metafields.product.passform | split: 'value":"' %}
{% assign valuePart = jsonData[1] | split: '"' %}
{{ valuePart[0] }}
{{ product.metafields.product.passform | metafield_tag }}
This is the solution
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025