Answers for "twig column"

0

twig column

{% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}

{% set fruits = items|column('fruit') %}

{# fruits now contains ['apple', 'orange'] #}
Posted by: Guest on October-13-2021

Browse Popular Code Answers by Language