Doug
07/24/2020, 5:36 AMval urlIds = ArrayList<Long?>
for (u in urls) {
urlIds.add(u.id)
}
Patrick Louis
07/24/2020, 5:55 AMval urlIds = urls.map { it.id }
Doug
07/24/2020, 6:18 AMTobias Berger
07/24/2020, 9:39 PMmapNotNull
, which will automatically discard the null
values and make the generic parameter in your response non-null