I was wondering if there is an efficient / easy way to reorder the list of a list by matching the values of another list that sets the order. More specifically, if I had the following list:
[["a", "1", "2"], ["b", "2", "3"]]
I would like to order it with the following list:
["b", "a"]
which leads to an ordered list:
[["b", "2", "3"], ["a", "1", "2"]]
Does anyone know how to do this?
Thanks in advance!
Best regards, Skyfe.
Skyfe source
share