From b74cf2ae6cdc7e700f4fccda6c9380a19ee3fb02 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Fri, 14 Jan 2022 12:19:38 +0100 Subject: [PATCH] Rename variables used in map method --- doc/filters/map.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters/map.rst b/doc/filters/map.rst index a2ff2a8f8e..5954da6ccf 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.