I think I’ll need more information to understand it – what would you like to achieve with the second piece of code? Why are using the following syntax?
I want to add an accordion on the single product page using metafields. I used “text” metafields for Accordion Title and the “rich text” field for the Accordion description. The code below is for Accordion description.
{% assign faq_data = product.metafields.custom.faq_data %}
{{ faq_data | raw }}