Group by key


#1

Can someone walk me through how to use the Group by Key node in Dynamo 0.7.1? I am not sure what the key projector is. Just want to group a list into multiple lists of the same value.

Thanks!


#2

The key projector is just a function that operates on the list to be sorted. Take, for example, a list of points, and I want to group them by they x-coordinate.

Capture

Also check out this thread: http://dynamobim.org/forums/search/group+by+key/, which uses an alternate technique in the case where the logic you are grouping items by is not directly related to the items themselves.


Organize flat list of Revit Elements into sublists based on parameter value
#3

got it. thanks!