How to merge Specific Tree branches

Hi there
I have a data tree {A;B} and would like to merge the first and the second branch within A together, the second and the third branch together and so on. The path it should be flattened on to should be the first of the two merging branches. Essentially, I would like the result to look like this:


But since I have a tree with over 6000 branches I can’t do it like this.

The end result will be to be able to select each star individually. The Top two lines of each star are already grouped correctly, so the first star would be {1;0}, now I need to match the lower lines, however the stars overlap which makes a little more challenging.

How do I do this so it works for the entire data tree?
I hope the question is clear.

Thanks in advance!

Hello

Please upload your file with internalized geometry :smiley:

Relative Item maybe ?

Hello,

Is this what you are after?

20230512_Pair_Every_Other_Branch_Item_01a.gh (8.7 KB)

This worked perfectly, thank you!

Hi Michael,
As an output I need 4 items per branch, as I’m not that experienced with grasshopper yet, I’m not sure how to adapt this properly. However, magicteddy’s suggestion worked. Thanks a lot for your answer though! I really appreciate it :).

Ah yes that makes sense! Glad you have the solution, cheers!