kmongo / kotlin.collections / com.mongodb.client.MongoIterable / sortedBy

sortedBy

inline fun <T, R : Comparable<R>> MongoIterable<T>.sortedBy(crossinline selector: (T) -> R?): List<T> (source)

Returns a list of all elements sorted according to natural sort order of the value returned by specified selector function.