I've got a query result of List[(Int,String,Double)]
that I need to convert to a Map[String,String]
(for display in an html select list)
My hacked solution is:
val prices = (dao.getPricing flatMap {
case(id, label, fee) =>
Map(id.toString -> (label+" $"+fee))
}).toMap
there must be a better way to achieve the same...