Reconstruct Data Tree

I have the data you see in the red panel. I want to reconstruct this data according to the path sequence in the blue panel.
I tried a way as you can see in the file, but in the end the “f” item in path 1 does not appear. (the “k” item in path 2 is repeated instead)

Can you help me with a different suggestion or where the problem is coming from?


unnamed.gh (12.6 KB)

this could be one way, to be used just for simple trees like in your case, you declare how many paths to merge together:


unnamed (8)_Re.gh (10.0 KB)


this I like more, for each path you declare the new path you want data to go into:

actually you can just replace paths :rofl:

unnamed (8)_ReRe.gh (8.2 KB)

1 Like

Thank you for your answers, it was a simplified version of the original question I had. As far as I can see your suggestions do not work on the original problem.
(I want to rebuild the data according to the path pattern in the blue panel)


unnamed1.gh (504.6 KB)

something like this?

unnamed1 (1)_Re.gh (508.4 KB)

what if I want to subdivide the data tree into 2 or other subgroups?

I got the result I wanted by reapplying your solution. thank you again.

1 Like

just one note, and just because it looks like you are trying to exactly match an existing data structure of some sort :upside_down_face:

in case you were not already aware, GH is not really interested in the “address” of each Path

don’t get me wrong, they are really helpful -expecially for us humans- to understand how data is structured and how trees are behaving, but in GH path matching happens on a 1-to-1 base, regardless of the numbers written between the {a;b;c;…}

1 Like