Use the allKeys method on an NSDictionary .
In docs :
allKeys : returns a new array containing dictionary keys.
- (NSArray *)allKeys
Return value
A new array containing dictionary keys, or an empty array if the dictionary has no entries.
Faizan S.
source share