oday
03/03/2019, 8:32 PMNikky
03/05/2019, 9:17 PMmap
over it filtering the lists ?
for the former: map.filterValues { it.any { searchQuery == it.propertyName}}
for the latter:
map.mapValues { (key, list) ->
list.filter { searchQuery == it.propertyName }
}
or similaroday
03/06/2019, 10:09 AMNikky
03/06/2019, 11:32 AMval filteredMap = map.mapValues { (key, list) ->
list.filter { searchQuery == it.propertyName }
}
.filterValues { it.isNotEmpty() }
maybe something like that ?