if I parse json list file from api server and chan...
# getting-started
a
if I parse json list file from api server and change it to dataclass if it is
val l = listOf(d1, d2, d3 ,d4 ,d7)
. how do i select the last element in the list but i cannot use
l[5]
or
l.get(5)
because they may change the list length in any time ?
s
You can use List#last afaik
a
l.last()
s
Yes
a
ok thank u😉