I have a certain json:
[ { \"id\" : 42422422, \"created\" : 1329684013, \"name\" : \"Test\" }, {
You should check if your result is an array or a dictionary first.
if ([jsonArray isKindOfClass:[NSArray class]]) { //process results } else if ([jsonArray isKindOfClass:[NSDictionary class]]) { NSDictionary *errorInfo = [(NSDictionary *)jsonArray objectForKey:@"error"]; //handle error... }