snowe
12/04/2017, 5:34 PMincomes:
HOURLY_SALARY_BASE_WAGE_INCOME:
- types: "PAYSTUB"
- types: "W2"
adam-mcneilly
12/04/2017, 5:37 PMval typesList = listOf("W2", "Paystub")
val map: Map<String, List<String>> = mapOf("types" to typesList)
println(map) // {types=[W2, Paystub]}
leosan
12/04/2017, 5:38 PM.mapValuesTo
key
to a value value of types
snowe
12/04/2017, 5:40 PMmapValues {}
but that maps the entire key as well.OTHER:
types:
OTHER:
- "LETTER_OF_EXPLANATION"
- "APPLICANT_FINANCIAL_STATEMENT"
val assets = assetValues.drop(1).groupBy({ it[assetEnumCol] }, { it[assetDocCol]}).mapValues { mapOf("types" to it.value) }
leosan
12/04/2017, 5:42 PMadam-mcneilly
12/04/2017, 5:43 PM