Nicolai
05/24/2022, 3:53 PM[{id: 1, isSomething: false},{id: 2, isSomething: false}]
and list B
[{id: 1, isSomething: true}]
Is there an easy nice clean way in kotlin to merge the two lists so it ends up favoring list B ending up giving me
{id: 1, isSomething: true},{id: 2, isSomething: false}]
ephemient
05/24/2022, 3:56 PM(listA.groupBy { it.id } + listB.groupBy { it.id }).values.map { it.single() }
Nicolai
05/24/2022, 4:00 PM