I have a map of format
scala.collection.mutable.Map[String,List[(Int, Int, Int)]]
and I want to be able to access the individual Int's. The format of the data to go in the Map will always be
Mon-18-June-2018,1:10:5,2:20:10,3:30:15,4:40:20,5:50:25
Where the date is the key of the Map and each set of three numbers is the (Int, Int, Int)
So far, I have been able to print the Map in this format
Mon-18-June-2018
List((1,10,5), (2,20,10), (3,30,15), (4,40,20), (5,50,25))
Using the below code
map.keys.foreach{i =>
println(i)
println(map(i))
I would like to be able to access the individual values in the tuples. For example, I would like to be able to add every 2nd and 3rd value of each tuple together
(1,10,5)
(2,20,10)
(3,30,15)
(4,40,20)
(5,50,25)
to get
(6,150,75)
How do I do this?