I want to put the result of a split, with the same order into a data model (case class). How to do this without using additional vals. What I mean is this:
Lets say I have a case calss:
case class Result(eachValue: String, ofValue: String, thisValue: String, couldValue: String, beValue: String, aValue: String, valueValue: String)
Then have a String like this:
"each.of.this.could.be.a.value".split('.') res0: Array[String] = Array("each", "of", "this", "could", "be", "a", "value")
How I can mapped the result into an instance of the case class?