Returns the value associated with a given key.
- iOS 6.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The key for which to return the corresponding value.
The value associated with
nil if no value is associated with
This method has the same behavior as the
You shouldn’t need to call this method directly. Instead, this method is called when accessing an object by key using subscripting.
Accessing Keys and Values
A new array containing the dictionary’s keys, or an empty array if the dictionary has no entries.
Returns a new array containing the keys corresponding to all occurrences of a given object in the dictionary.
A new array containing the dictionary’s values, or an empty array if the dictionary has no entries.