Organize Lists of Lists By X Element of List


I am trying to organize a lists of lists by a specific element within each lists (in my case, the column location mark I have created).

When I use the node list sort after applying a list map to the applied specific element with each list, I get what I desire, but I need all of my other information related to that specific list to be reorganized as well.

I was not sure if I could index the “sort” node to see where each reorganized list moved? Somehow I need to get all information reorganized based on column mark and I am at a loss as to how to do this. Below is a snapshot of the data (list of lists) as it is exported to excel and I gave some markups of how I want the data to appear. The first column picked is the column I am trying to organize lists of list by, with all data to move with the associated first column data.

Updated with Excel Option.dyn (78.1 KB)

Thanks in advance for the help!

You should in that case sort not only the one set of data but all your data. Hope this example helps you see what I mean:

1 Like

Thank you! This did the trick.
Does the @L2 tell the node to look at the nested list index?

Yes the “@L2” is what is called “list-levels” it saves you from having to use the “Map” node etc. It can be quite powerful combined with controlling the lacing.

You can see the levels in the bottom of the preview in the first codeblock.

If I were to choose @L3 I would look for the list with index 0, and get “b,1,3,5” as output.

More info of list-levels can be found here:

Thank for the link. That makes a lot of sense.