How can use filter and contains with multi-ArrayList in Kotlin so I only have elements which match the condition?
I have a class called Person
data class Person(
val id: Int,
val name: String
data class IDs(
val id : Int,
val active : Boolean )
and an array list that has numbers of ids and another list of Persons
val myStu = listOf(Person(1, "Name_1"), Person(2, "Name_2"), Person(3, "Name_3"))
var ids = listOf(IDs(1,false),IDs(2,true),IDs(3,true))
var newIds = listOf(2,3,4,6)
First I want to apply two actions to the myStu, first is to have a list that include all the items from myStu...