My CSV looks like this
id | weight |
---|---|
1 | 38 |
4 | 98 |
4 | 66 |
6 | 89 |
I would like to produce my output into list of these maps:
Map("id"->1,"weight"->38)
Map("id->4,weight"->98)
I am using gatling pebble template, I tried to read the records from cCSV like this:
val records=csv(my.csv).readRecords()
and then from these records I am unable to convert it into this desired map.
The pebble template which takes map in this format:
Iterator[Map[String],List[Map[String][String]]]
I am using id
and weight
in my template.