The for each loop uses indexes to access the elements. This being said you should not modify the array while looping through it. I would create a local variable for the things that need to be removed and remove all of them after the loop completion.
1 Like
Set Members
Answered here:
1 Like