diff --git a/doc/filters/map.rst b/doc/filters/map.rst index a2ff2a8f8ef..5954da6ccff 100644 --- a/doc/filters/map.rst +++ b/doc/filters/map.rst @@ -27,7 +27,7 @@ The arrow function also receives the key as a second argument: "Alice": "Dupond", } %} - {{ people|map((last, first) => "#{first} #{last}")|join(', ') }} + {{ people|map((value, key) => "#{value} #{key}")|join(', ') }} {# outputs Bob Smith, Alice Dupond #} Note that the arrow function has access to the current context.