How to filter a list by its item member variable must not null and map its member?
for example:
Copy code
data class Foo(val id: String? = null)
val list = listOf(Foo("0"), Foo(), Foo("2"))
// I would like to get ["0", "2"]
// I use this, but I don't like the Double !!
list.filter { it.id != null }
.map { it.id!! }