Kotlin, Kotlin Tips, Kotlin Tips Collection, Java, JVM.
a List of Strings Suppose you have a list of names that you want to sort alphabetically: In this example, sortedBy takes a selector function { it } that simply returns each element, and the list is sorted based on the natural order of the strings. Sorting Objects by a Property Consider a list of