How do I remove an object from all arrays that contain it?

NSMutableArray *totalArray = NSMutableArray alloc init; //here I assume you want to delete NSString object vijay in all arrays NSString *toDelete=@"vijay"; totalArray addObject:firstArray; totalArray addObject:secondArray; for (NSMutableArray *arr in totalArray) { if (arr containsObject:toDelete) { arr removeObject:toDelete; } } NSLog(@"firstarry : %@ \n\n",firstArray); NSLog(@"secondarray : %@ \n\n",secondArray).

I want to remove only this specific item from all the arrays, not all the items of one array – Lucas Aug 24 at 13:20 updated code............. – AppleVijay Aug 24 at 13:28 stackoverflow. Com/questions/6308425/… – AppleVijay Aug 24 at 17:34 I'm talking about iOS 4, where there's no ARC – Lucas Aug 240 at 8:08.

I'm developing for iOS 5, say I have 2 arrays, the second only contains items contained on the first one. I want to remove this object in every array it's present. So, is there a way to easily remove an object from all arrays that contains it?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions