Hi,
metaobject is really cool, but still really strange to work with them. How Retrieve Metafield With Metaobject Type Rich Text?
{% assign care_instruction = product.metafields.sp_custom.care_instruction.value %}
{% assign fabric_icon = care_instruction.fabric_icon %} //image obejct
{% assign fabric_text = care_instruction.fabric_text %} // metaobject with selected type Rich text
---> OK
{{ fabric_text }} ---> return this:
{{ fabric_text.value.children }} return this:
but not sure why can't go deeper for example {{ fabric_text.value.children.children }}
{
"type": "root",
"children": [{
"children": [{
"type": "text",
"value": "Made from "
}, {
"type": "text",
"value": "GSM",
"bold": true
}, {
"type": "text",
"value": " organic "
}, {
"type": "text",
"value": "100% .",
"bold": true
}],
"type": "paragraph"
}]
}
{
"children" => [{
"type" => "text",
"value" => "Made from "
}, {
"type" => "text",
"value" => "160",
"bold" => true
}, {
"type" => "text",
"value" => " organic "
}, {
"type" => "text",
"value" => "100% ",
"bold" => true
}], "type" => "paragraph"
}
how to convert to text?