Merge equals in list

Hello, Cab someone help me with the list? I’ve a few i times that are exactly equal to each other, I want to merge them together.

My final result is to great automatic Marks, the equal items (for the Type and Lenght) supposed to have the same Mark.

Example:
I’ve twice "Family=balk geschaafd_gen 71x171 with the Lenght of 1500 with the Mark 1
I’ve one "Family=balk geschaafd_gen 38x151 with the Lenght of 1500 with the Mark 2

You could try the List.UniqueItems node. May need to adjust Levels to get it to compare the upper level list.

If you just want 1 instance of each unique type and size, then UniqueItems will provide the result you want.
If you instead want to keep them all, but group up matching items into the same sublist then you’ll want to utilise GroupByKey

1 Like

Thank you for helping me out. The GroupByKey did his work

I trying to expand the dynamo script. I’m trying to seperate the structural framing for each assembly.

for example:
For assembly 1:
I’ve twice "Family=balk geschaafd_gen 71x171 with the Lenght of 1500 with the Mark 1
I’ve one "Family=balk geschaafd_gen 38x151 with the Lenght of 1500 with the Mark 2

Fro assemby 2:
I’ve twice "Family=balk geschaafd_gen 71x171 with the Lenght of 1600 with the Mark 1
I’ve one "Family=balk geschaafd_gen 38x151 with the Lenght of 1600 with the Mark 2