From 03e0d45b4e794d7a45270bda635e94362039081d Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 24 May 2024 18:31:29 +0100 Subject: [PATCH] Document `select` modifier --- content/collections/modifiers/select.md | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 content/collections/modifiers/select.md diff --git a/content/collections/modifiers/select.md b/content/collections/modifiers/select.md new file mode 100644 index 000000000..e11b4b3cb --- /dev/null +++ b/content/collections/modifiers/select.md @@ -0,0 +1,41 @@ +--- +id: 864d101a-c0a2-42d8-a644-80440316de8b +blueprint: modifiers +title: Select +modifier_types: + - array + - utility +--- +Retrieves the selected values of a given array. + +```yaml +games: + - + feeling: love + title: Dominion + publisher: Rio Grande Games + - + feeling: love + title: Netrunner + publisher: Wizards of the Coast + - + feeling: hate + title: Chutes and Ladders + publisher: Unknown +``` + +``` +{{ games | select('title', 'publisher') }} +``` + +```yaml +- + title: Dominion + publisher: Rio Grande Games +- + title: Netrunner + publisher: Wizards of the Coast +- + title: Chutes and Ladders + publisher: Unknown +```