How do you get around the container restrictions that were introduced in M2, that you can’t dynamically add or remove items while you iterate through a container during an Eachin loop?
Especially when you want to add to it. So far I have an idea where I store the new items in a second container which is then to be merged into the first one. Overkill I say.
Does anyone know a reason why these restrictions where introduced? In MX it worked fine. When you want to remove something, make sure you iterate backwards. With adding it didn’t matter.