I am parsing some JSON values. I have a NSDictionary and for a certain value the object I get can either be a NSString (e.g. “USA”) or a NSDictionary (e.g. 1=”USA”, 2=”UK” etc).
Is there a way to know when the object is NSString or NSDictionary ?
Thanks.
All classes inherited from NSObject class have a couple of methods to test inheritance, behavior and conformance:
In your case use isKindOfClass: method: