Hi,
I don't know if it is just a quirk of how InDesign handles its collections but when you do a merge withs cells in a collection, the collection does not change until you actually call it again, so you can work with all the elements, you do have to be careful, because if you rely on the change you have to refresh the collection. This can be seen in the debugger,
As can be seen above I have merged 8 cells into for, but the length of the _cells collection is still 8, so it has not updated.
It should also be noted that using this method you can't actually delete cells, you are not allowed to, the JS throughs an error.
... View more