List[String] = List(id:1, count:23331, id:3, count:34123, id:4, count:4021)
I have a list of string as above
I want the output to be below
List((1,23331),(3,34123),(4,4021))
Scala Code :
scala> val result = res11
result: List[String] = List(id:1, count:23331, id:3, count:34123, id:4, count:4021)
scala> result.map(elem => elem.split(":")(1))
res12: List[String] = List(1, 23331, 3, 34123, 4, 4021)
Could someone help me to get the expected output