Let say I have a list of strings:
val myList: List[String] = List("A", "B", "C") Is there a way to convert/cast this list to a user defined Object without hardcoding, something along the lines of:
case class MyClass(name1: String, name2: String, name3: String) val result: MyClass = myList.asInstanceOf[MyClass]
case class MyClass(names: List[String])and pass the list.