Grafting based on values in branch

Hi all,

Total grasshopper newbie here, still trying to wrap my head around data trees and data matching. I scoured the internet for a way to divide a tree into sub-branches based on the values in a current branch. In the example below I would like to achieve a structure like this:
{0;1;0}
1
1
1
1
{0;2;0}
1
{0;2;0}
1
{0;2;1}
2
2
2
{0;3;0}
1
{0;3;1}
3
3

In addition, I would like to apply the exact same transformation/remapping to a data tree with breps, based on the transformation of the list in the example.

My final goal is to a use attribute user text to create a data tree structure where a large amount of data is sorted into branches based on keys/values. In the end I want to calculate the volume of the breps in the different sorted branches. Something like this:
Key 1 - Value 1
-Key 2 - Value 1
–Key 3 - Value 1
—(list of volumes of breps)
–Key 3 - Value 2
—(list of volumes of breps)
-Key 2 - Value 2
—Key 3 - Value 1
—(list of volumes of breps)
–Key 3 - Value 2
—(list of volumes of breps)
Key 1 - Value 2
-Key 2 - Value 1
–Key 3 - Value 1
—(list of volumes of breps)
–Key 3 - Value 2
—(list of volumes of breps)
-Key 2 - Value 2
—Key 3 - Value 1
—(list of volumes of breps)
–Key 3 - Value 2
—(list of volumes of breps)

I succeeded fine in filtering out elements of a series of key-value pairs using elefront, but my final goal is to be able to output an excel in the format above, and my current method requires me to manually change the filters in order to get the different categories. I figured getting a data tree like the one described above could be one way of achieving what I want, but I am stumped trying to create sub-branches based on the values in a current branch.

I decided to solve it using an excel PivotTable instead!