Hello, is it possible by using kotlin's stdlib to ...
# getting-started
t
Hello, is it possible by using kotlin's stdlib to apply
associateBy
on multiple level? Maybe not clear.. So I have something like
Copy code
val list = listOf(listOf("value1", "value2", "value3"))
If I do use the method
associateBy
, I will get the fellowing output
Copy code
println(list.associateBy { it[0] })
// {value1=[value1, value2, value3]}
And I would like something like:
Copy code
{value1={value2=[value1, value2, value3]}}
Is it possible?
I was confusing with groupBy