I'm trying to access metafields containing an array that I want to loop over.
I've tried solutions online to no avail. Do you have any suggestions?
This is the JSON.
[
{
"id": 1,
"title": "Why do pets love CBD so much?",
"pub": "ScienceDirect",
"url": "https://www.efsa.europa.eu/en/news/cannabidiol-novel-food-evaluations-hold-pending-new-data"
},
{
"id": 2,
"title": "When will CBD take over the world",
"pub": "Anna Research Institute",
"url": "https://www.efsa.europa.eu/en/news/cannabidiol-novel-food-evaluations-hold-pending-new-data"
}
]
The metafield is article.metafields.custom.source_snippet
In my article template I'm trying to access it via {% assign sources = article.metafields.custom.source_snippet %}
This usually worked with the old "Metafields Guru".
Thanks.