Merge Sub-Branches

Hello,
i have a tree with branches / sub-branches of different depth and i need to collapse each branch hierarchy to just one level but keeping the original indices of that first level. Hope that makes sense!
Trim tree or shift require you to know the actual hierarchy level count so i haven’t found a way to do that yet, if the branches were uniform that would work.
Any ideas?

OK replying to my own thread here, i messed around with the infamous path mapper

{A;B;C} {A}
{A;B;C;D} {B}

that fixed it.

Omg thank you for sharing the solution here! :slight_smile:
I’ve got the same problem and Path mapper solve it.