I'm a Scala newbie I'm afraid: I'm trying to convert a Map to a new Map based on some simple logic:
val postVals = Map("test" -> "testing1", "test2" -> "testing2", "test3" -> "testing3")
I want to test for value "testing1" and change the value (while creating a new Map)
def modMap(postVals: Map[String, String]): Map[String, String] = {
postVals foreach {case(k, v) => if(v=="testing1") postVals.update(k, "new value")}
}