Returns an ordered set containing the results of invoking value
using key on each of the ordered set’s objects.
SDKs
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func value(forKey key: String) -> Any
Parameters
key
The key to retrieve.
Return Value
The ordered set of the values for the retrieved key. The returned ordered set might not have the same number of members as the receiver.
Discussion
The returned ordered set will not contain any elements corresponding to instances of value
returning nil
, nor will it contain duplicates.