Specifically, this problem has come to me when I make a request with AFNeworking with JSONkit and receive a (id)JSON with several arrays and dictionaries nested.
If I don't want to modify the data, I don't have any problem:
self.myNSArray = [JSON objectForKey:@"result"];
self.myNSMutableArray = [[JSON objectForKey:@"result"] mutableCopy];
You could use the CoreFoundation function
CFPropertyListCreateDeepCopy with the mutability option
NSArray *immutableArray = [JSON objectForKey:@"result"]; self.myMutableArray = [(NSMutableArray *)CFPropertyListCreateDeepCopy(NULL, immutableArray, kCFPropertyListMutableContainersAndLeaves) autorelease];