Dictionary data type
A collection of keys and values.
Permitted contents
A key can only be a boolean, date, numeric or text data type. A key must be unique.
A value can be any data type.
Access by key
A value contained in the dictionary can be returned using the syntax dictionary[key]
If the key does not exist a template error will occur.
Methods
| Name | Description | Return type |
|---|---|---|
| Bottom | Returns a specified number of elements at the bottom of the dictionary. | Dictionary |
| ContainsKey | Tests if a key is present in the dictionary. | Boolean |
| First | Returns the first element's value in the dictionary. | Any type |
| Last | Returns the last element's value in the dictionary. | Any type |
| Length | Returns the number of elements. | Number |
| Reverse | Reverses the order of the elements in the dictionary. | Dictionary |
| Shuffle | Randomises the order of the elements in the dictionary. | Dictionary |
| Top | Returns a specified number of elements at the top of the dictionary. | Dictionary |