Returns an array containing the results of invoking value
using key
on each of the array's objects.
SDKs
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
- (id)valueForKey:(NSString *)key;
Parameters
key
The key to retrieve.
Return Value
The value of the retrieved key.
Discussion
The returned array contains NSNull
elements for each object that returns nil
.