How do I iterate through children of an object's structure variable

How is your structure composed?
Can you manually keep track of what values are added/removed?

If not, consider rework it to arrays, otherwise resorting a structure is a pain if you can’t use scene objects to rewrite it.

E:
you can read this:

to see why using an array is is probably the better solution