Sorting Lists of Lists


I’ve been using Dynamo for a few weeks now and feel like I learn something new every time I open it up. And usually, no matter what the problem, I can typically find a solution by searching the forum, trying every node combination I can think of, or just sheer luck. However, I’m truly stumped on this one… so any help someone can provide will be greatly appreciated.

I’m trying to sort a list of lists by keys from another list of lists. If I try and do this in Grasshopper, I have no problems (see image). But if I try to do the same thing in Dynamo, things get erratic.








I looked into the amazing Clockwork package from Andreas and he has a node that seems to be perfect for this… “List.SortListOfLists”. However, my lists of lists need to be combined into one list so that it can reference the sorting index. When I try to join them, the lists become consecutive, rather than add another level of lists like it would if the input lists were flattened beforehand.












I hope that made sense. Essentially, I want each input tree to become a separate branch of a new tree. And if thats possible in Dynamo, would that even be what I need to do to get Clockwork’s node to work?


Again, I appreciate any direction. Thanks!


Hi Phillip,
Try the Reorder node. It’s in the mysterious Built In Functions category.



Thanks! That is exactly what I needed. I appreciate the help and all the work you and your team have put into this. Our firm is excited to see how we can use Dynamo in the near future.