sortedWith

fun <T> MongoIterable<T>.sortedWith(comparator: Comparator<in T>): List<T>

Returns a list of all elements sorted according to the specified comparator.