Actually I get from an API a report using this str...
# getting-started
t
Actually I get from an API a report using this structure
Copy code
{
  fields: [userId, contentId, clicks],
  rows: [[1, 1, 456], [1, 2, 4543], [2, 3, 543]]
}
And to map them I do
Copy code
val reportHeaderIndex = with(reportResult.fields) {
        ReportHeaderIndex(
            userId = indexOf("userId"),
            contentId = indexOf("contentId"),
            clicks = indexOf("clicks")
        )
    }
    val reportHash = HashMap<Int, HashMap<Int, HashMap<String, List<Int>>>>()
    reportResult.rows.forEach { row ->
        reportHash
            .getOrPut(row[reportHeaderIndex.userId] as Int, { HashMap() })
            .getOrPut(row[reportHeaderIndex.contentId] as Int, { HashMap() })
            .put(row[reportHeaderIndex.clicks] as Int, row)
    }