I’d like to parse a NSMutableArray, and when I find some objects that respond to some conditions, I’d like to remove them from the array.
How may I do this without having two (or more) array for the process ?
For those who will be tempted to say : Hey, it’s just impossible to parse AND remove objects from an array, I just can say that when I parse a drawer from which I want to remove out of date medicines, I do not have problem to do it… When I find one, I trash it, then I look for the next medicine box to check. I do not need a second drawer.
I found a super elegant solution, that works with 2 arrays, ok, but that prevents to make a parsing loop in many situations ;