I have a problem reorganising a list:
I have a first list that retrieves the ID of the items in a family in my project.
I have a second list that retrieves a parameter from this family (its number).
My third list sorts my second list by increasing number.
Now I’d like to create a fourth list that reorganises my first list in relation to my third list.
Does anyone have any ideas? Thanks !
sorry, I have found a solution with python:
liste_elements = UnwrapElement(IN)
liste_numeros = IN
elements_tries = sorted(liste_elements, key=lambda x: liste_numeros[liste_elements.index(x)])
OUT = elements_tries
List.SortByKey node would do the trick. The list is your first list, and the keys are your second. No need for the third as the sorted keys will be produced along with the sorted list.