Hi,
I can’t figure out split and join arrays… In twig file I want to split and join a set of array in a format like “xxx”, “yyy”, with quotes with comma. This array is ingredients of a recipe microdata. Every array comes with comma but in a single line with quotes. Like this: “xxx, yyy, zzz,” which I want to make it [ “xxx”, “yyy”, “zzz” ]
Is there a way to make every array with quotes and end with comma?
{% set foo = page.header.ingredients|join(’, ') %}
“recipeIngredient”: “{{ foo }}”,