Answers for "twig array first element"

0

twig array first element

{{ [1, 2, 3, 4]|first }}
{# outputs 1 #}

{{ { a: 1, b: 2, c: 3, d: 4 }|first }}
{# outputs 1 #}

{{ '1234'|first }}
{# outputs 1 #}
Posted by: Guest on July-26-2021

Browse Popular Code Answers by Language