Sort tree data

Hi,

I am trying a relatively simple exercise but I just can’t figure it out. I have a list of values and a list of indexes, and I would like to sort the values according to the index, however, the second challenge is that the index is in a deeper branch and I want the new list of values to inherit the subbranch order. I hope I explain myself properly.

Thanks


Redorder data.gh (196.6 KB)