Tristan Caron
03/02/2018, 11:10 AMassociateBy
on multiple level? Maybe not clear..
So I have something like
val list = listOf(listOf("value1", "value2", "value3"))
If I do use the method associateBy
, I will get the fellowing output
println(list.associateBy { it[0] })
// {value1=[value1, value2, value3]}
And I would like something like:
{value1={value2=[value1, value2, value3]}}
Is it possible?Tristan Caron
03/02/2018, 2:08 PM