Double Sorting

Dear Friends,
how can we make double sorting. I mean firstly sort by Valve type then by size of valve. I prepared photo what i mentioned. :disappointed:

It might not be the cleanest way but it should work

Or if the prefix to the values are always going to be the same, you could remove the prefix of the strings and use the SortByFunction node.

Using a List.GroupByKey node and feeding that into a List.SortByKey with lacing set to longest should also work without requiring python.