Item to Path - Index to Item

Hello.

I have a list of 28031 items that range from -1 to 13. I need a tree which has paths -1 to 13 and each path should contain the index number of every index that contains the path number in the original list. Sorry, I don’t know how to word it better :smiley:

Here is what I have:

I need the new tree to be something like:

Item_Path_Index.gh (320.9 KB)


Item_Path_Index_re.gh (326.0 KB)