From 699de883d18e436abfaaad57a64576ee14dae6aa Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 15 Nov 2023 13:05:54 -0800 Subject: [PATCH] Inlcude example of newScratch.Values --- content/en/functions/collections/NewScratch.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/en/functions/collections/NewScratch.md b/content/en/functions/collections/NewScratch.md index 1cfc2dc4b..793b2b4b5 100644 --- a/content/en/functions/collections/NewScratch.md +++ b/content/en/functions/collections/NewScratch.md @@ -105,3 +105,11 @@ Delete Values : Returns the raw backing map. Do not use with `Scratch` or `Store` methods on a `Page` object due to concurrency issues. + +```go-html-template +{{ $s := newScratch }} +{{ $s.SetInMap "greetings" "english" "Hello" }} +{{ $s.SetInMap "greetings" "french" "Bonjour" }} + +{{ $map := $s.Values }} +```