I have an input string
val x = "snapshot_year_month=201610,snapshot_day=05,source='zzz'"
val y = x.split(",")
This produces a 3 part array y. Now, I want to take each item in y and split it again by = and have the final output in Array[Array[String]. How would I do this? I tried the following but it did not work.
var finalSplit = y.foreach(z => z.split("="))
.foreachreturns aUnit. It doesn't return anything (at least, it doesn't return anything you can later manipulate). Use.mapinstead.