From d01e7e0fed16c8f6ae4d3827dc73dd1d37fe0c31 Mon Sep 17 00:00:00 2001 From: Guilliam Xavier Date: Mon, 24 Jun 2019 12:54:09 +0200 Subject: [PATCH] [doc] "map" filter: fix args order (value, key) --- 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 777b05a7c..9b1f5d738 100644 --- a/doc/filters/map.rst +++ b/doc/filters/map.rst @@ -26,7 +26,7 @@ The arrow function also receives the key as a second argument: "Alice": "Dupond", } %} - {{ people|map((first, last) => "#{first} #{last}")|join(', ') }} + {{ people|map((last, first) => "#{first} #{last}")|join(', ') }} {# outputs Bob Smith, Alice Dupond #} Note that the arrow function has access to the current context.