aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Syntax.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index 9958db5..b69ad00 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -454,6 +454,15 @@ Keys must be unique:
my_dict = {'foo': 42, 'foo': 43}
```
+Accessing elements of a dictionary works similarly to array indexing:
+
+```meson
+my_dict = {'foo': 42, 'bar': 'baz'}
+forty_two = my_dict['foo']
+# This will fail
+my_dict['does_not_exist']
+```
+
Dictionaries are immutable and do not have a guaranteed order.
Dictionaries are available since 0.47.0.