Why doesn’t [NSArray class] return what I expected? <p>I am trying to parse some JSON that I get via a web service. The logic is :</p> <pre><code>id jsonObject = ....; //This can be string or array if([jsonObject class] == [NSString class] || [jsonObject class] == [NSMutableString class]{ // DO some thing } else if([jsonObject class] = [NSArray class] || [jsonObject class] == [NSMutableArray class]{ // Do some thing else } </code></pre> <p>However for one of the elements I ran into a weird problem. The class of this element should be NSArray but when I run the code I see the class as __NSArrayM. This does not match the second if block. </p> <p>Can some one tell me what I am doing wrong</p>