diff options
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r-- | docs/markdown/Reference-manual.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 1e0e4c9..6c20221 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1737,6 +1737,23 @@ The following methods are defined for all [arrays](Syntax.md#arrays): You can also iterate over arrays with the [`foreach` statement](Syntax.md#foreach-statements). +### `dictionary` object + +The following methods are defined for all [dictionaries](Syntax.md#dictionaries): + +- `has_key(key)` returns `true` if the dictionary contains the key + given as argument, `false` otherwise + +- `get(key, fallback)`, returns the value for the key given as first argument + if it is present in the dictionary, or the optional fallback value given + as the second argument. If a single argument was given and the key was not + found, causes a fatal error + +You can also iterate over dictionaries with the [`foreach` +statement](Syntax.md#foreach-statements). + +Dictionaries are available since 0.47.0. + ## Returned objects These are objects returned by the [functions listed above](#functions). |