sortedByValue

inline fun <K, V> Map<K, V>.sortedByValue(): Map<K, V>

Returns a map of all elements sorted by value.

Example:

mapOf(5 to 1, 10 to 10, 1 to 0).sortedByValue() // {1:0, 5:1, 10:10}
mapOf("11" to 1, "1" to 10, "a" to 0).sortedByValue() // {"1":10, "11":1, "a":0}

Since

1.1.0