Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
{% assign dco_data = '{ "DCO111": { "DCOIDlogo": "423", "PARTNER": "One", "promo_code": "pro", "offer": "Valentine" }, "DCO222": { "DCOIDlogo": "342", "PARTNER": "Two", "promo_code": "promotwo", "offer": "Christmas" } }' | parse_json %} {% assign dco_id = 'DCO111' %} {% assign dco_info = dco_data[dco_id] %} DCOIDlogo: {{ dco_info.DCOIDlogo }} PARTNER: {{ dco_info.PARTNER }} promo_code: {{ dco_info.promo_code }} offer: {{ dco_info.offer }}
I'm attempting to extract all the inner values from this nested hash and output them. However, despite my efforts, I'm not getting the desired result. Currently, I'm using the following code: {% assign dco_id = 'DCO111' %} {% assign dco_info = dco_data[dco_id] %} DCOIDlogo: {{ dco_info.DCOIDlogo }} Can someone guide how to effectively achieve this task using Liquid? I'm open to any help or suggestions. Thank you!
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025