I am using json4s for parsing a json object which gives me result like this:
JObject(List((x,JArray(List(JString(x_value)))),
(y,JArray(List(JString(y_value)))),
(z,JArray(List(JString(z_value))))))
Now I want to convert it like this:
Map("x" -> Array("x_value"),
"y" -> Array("y_value"),
"z" -> Array("z_value"))
I am not sure how to do this. I am new to this. I tried using case class but I got confused because case class will give me separate x, y, z values but these attributes are dynamic and can have more.