diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/functions/scratch.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/content/en/functions/scratch.md b/docs/content/en/functions/scratch.md index 10623b2cb..f42b0ad57 100644 --- a/docs/content/en/functions/scratch.md +++ b/docs/content/en/functions/scratch.md @@ -97,6 +97,18 @@ Takes a `key`, `mapKey` and `value` and add a map of `mapKey` and `value` to the {{ .Scratch.Get "greetings" }} > map[french:Bonjour english:Hello] ``` +#### .DeleteInMap +Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. + +```go-html-template +{{ .Scratch.SetInMap "greetings" "english" "Hello" }} +{{ .Scratch.SetInMap "greetings" "french" "Bonjour" }} +---- +{{ .Scratch.DeleteInMap "greetings" "english" }} +---- +{{ .Scratch.Get "greetings" }} > map[french:Bonjour] +``` + #### .GetSortedMapValues Returns array of values from `key` sorted by `mapKey` |