How to? removing specific element(index) from a branch

in theory, how would you go about deleting a specific element within a branch?

It seems such a simple thing to do, but then again not so trivial after all.

I came up with this, but I can’t maintain the initial path structure without adding more code again.

I would first try to avoid this because it’s hard to maintain :sweat_smile: (if the amount of branches/items change…).

If I really have to do this, I explode the tree, do what I have to do in each branch, and merge it back.

In your case you could graft the input tree, change the mask to 0;2;0 and Trim Tree the negative output.

nice one. I haven’t engaged much with the TrimTree node.

I haven’t had the need to do this very often, but if you try to explain list management to someone, this is one of the questions I would want to be able to answer clearly.

Still wondering that we have “tree Item” but not “cull tree item”