Is there a method that runs on a collection of objects, returning a collection that contains a specific field from the original collection? ( I tried searching through all collection methods with no success, no google help too)
For example:
Copy code
data class Dog(val id: Int, val name: String)
val dogs = arrayListOf(Dog(0, "jack"), Dog(1,"Jacky"), Dog(2, "Chan"))
val listOfDogsId = dogs.somecoolmethodhere(it.id) // listOfDogsId = arrayListOf<Int>(0,1,2)