Objective-c – How to check if an NSDictionary or NSMutableDictionary contains a key

foundationobjective c

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

Best Answer

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