Good day, i\'m stuck figuring out how to get a single object from a list, i did google but all the topics show how to return a List with sorted objects or somet
List
Simplify
val user: User = myList.single { it.userId == id }
or if may list not have your filter
val user: User? = myList.singleOrNull{ it.userId == id }