How to group and then sort the list of objects in Kotlin?
I have a list of objects with the following values
data class Account(val accountName:String,val deleteAllowed:Boolean,val accountType:String)
I want to first display the object with 'deleteAllowed'=false. If there are 2 object with 'deleteAllowed' = false, then the first one to be displayed is the one with 'accountType'="transactional" . And the rest should be sorted based on 'accountName'.