AmrJyniat
11/17/2022, 8:20 AMval list = listOf<Pair<Int, Int>>()
val (firstList, secondList) = ?? //how to do the mapping on the list here
ephemient
11/17/2022, 8:21 AMAmrJyniat
11/17/2022, 8:27 AMdata class User(id, name)
val list = List<User>()
val (ids, names) = list.? // I need to map the ids into the first list and the names into the second list
ephemient
11/17/2022, 8:31 AMephemient
11/17/2022, 8:31 AMval (ids, names) = list.map { it.id to it.name }.unzip()
AmrJyniat
11/17/2022, 8:39 AM