Skip to content
Boris Shilov edited this page Jun 21, 2019 · 3 revisions

Lookup a row

You can lookup values by constructing a Map:

val data= CollSeq(("Zesa",10,20),
                   ("Eskom",5,11),
                   ("Sars",16,13))

val lookupByRow= data._1.zip(data).toMap

lookupByRow("Sars")
res4: Product3[String,Int,Int] = (Sars,16,13)