| Start |
|---|
| Declaring Dictionaries Dictionaries are an unordered collection of keys and values. Values relate to unique keys and must be of the same type. When initializing a Dictionary the full syntax is as follows: Although a more concise way of initializing: Declare a dictionary with keys and values by specifying them in a comma separated list. The types can be inferred from the types of keys and values. |
| Accessing Values A value in a The values of a dictionary can be iterated through using the Similarly, the keys of a dictionary can be iterated through using its To get all Note that a If you want to access multiple levels of a Dictionary use a repeated subscript syntax. |
Change Value of Dictionary using Key |
| Modifying Dictionaries Add a key and value to a Dictionary updateValue returns the original value if one exists or nil. Remove value and their keys with similar syntax |
Get all keys in Dictionary |
Merge two dictionaries RemarksSome examples in this topic might have a different order when used because dictionary order is not guaranteed. |
Read Article
https://develop.horje.com/learn/1434/reference