How to sort a list by a nested value

Hello, how do I go about sorting a list by a nested sublist value?
Here I have a list of duplicated elements and their quantities. I want to be able to sort the list by quanties by putting the elements with the most quantities at the top of the list so that we can prioritize our efforts on fixing this issue. Thanks!
image

Use List map and get item at index 1, then use sort by key and use the list map output as keys, and your nested list as list input on the sort by keys node.

Hope that makes sense

A

2 Likes