Is there any more efficient way of doing this: ```...
# announcements
d
Is there any more efficient way of doing this:
Copy code
listOf("cat1-subcat1", "cat1-subcat2", "cat1-subcat3", "cat2-subcat1", "cat2-subcat2")
        .groupBy({ it.split("-")[0] }, { it.split("-")[1] })
? Result:
{cat1=[subcat1, subcat2, subcat3], cat2=[subcat1, subcat2]}
🐱 1