I have a List of Map, each containing three key/value pairs:
List(
Map("id" -> 1, "key" -> 11, "value" -> 111),
Map("id" -> 2, "key" -> 22, "value" -> 222),
Map("id" -> 3, "key" -> 33, "value" -> 333),
Map("id" -> 4, "key" -> 44, "value" -> 444))
I would like to transform this to JSON but before that I need to remove the key and its value from every map and rename the value key to title. How can this be done in Scala in a elegant way?