How to check if an NSDictionary or NSMutableDictionary contains a key?

dontWatchMyProfile picture dontWatchMyProfile · May 6, 2010 · Viewed 245.1k times · Source

I need to check if an dict has a key or not. How?

Answer

Adirael picture Adirael · May 6, 2010

objectForKey will return nil if a key doesn't exist.