1``column``
2==========
3
4.. versionadded:: 2.8
5
6    The ``column`` filter was added in Twig 2.8.
7
8The ``column`` filter returns the values from a single column in the input
9array.
10
11.. code-block:: twig
12
13    {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
14
15    {% set fruits = items|column('fruit') %}
16
17    {# fruits now contains ['apple', 'orange'] #}
18
19.. note::
20
21    Internally, Twig uses the PHP `array_column`_ function.
22
23Arguments
24---------
25
26* ``name``: The column name to extract
27
28.. _`array_column`: https://secure.php.net/array_column
29