Group list by value

Hie,
I am trying to group elements of a list. I like to create list with the elements who has the same value. I.e. one list wit the elements of value 5350, other with 4010,… Could you help me?
Regards.

List.GroupByKey

@Daan @FRAN1972 ,

these


nodes are the answer to all questions in the universe :slight_smile:

hello, you can plug in keys your list also for List.Group.ByKey :wink:

Cordially
christian.stan

How does the Object.Identity work in this .dyn?
What does it do? Why does 1.0 get rounded to 1?

Object.Identity literally doesn’t do anything to the data. A code block with “x;” in it would result in the same. For the second question: I don’t know, maybe @jacob.small has an answer.

Yes Daan…thats normal and think is had to be that way but still a double so all good i think :wink:

Depending on your Dynamo build, this can just be a display thing more then a functional thing. Check the object.Type to confirm.

Thanks so much to all.

While your solution definitely works, I’m not sure why you added to the object.Identity node.
Skipping that step works just as well.

@PauLtus ,

intresting, it is grouping by itself! :wink: