Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> var mlist = List(Map[String, String](("id" -> "abc"), ("name" -> "xyz"), ("others" -> "values")),Map[String, String](("id" -> "bcd"), ("name" -> "dsf"), ("others" -> "values")))
- mlist: List[scala.collection.immutable.Map[String,String]] = List(Map(id -> abc, name -> xyz, others -> values), Map(id -> bcd, name -> dsf, others -> values))
- scala> mlist.map(_ - "others")
- res10: List[scala.collection.immutable.Map[String,String]] = List(Map(id -> abc, name -> xyz), Map(id -> bcd, name -> dsf))
Advertisement
Add Comment
Please, Sign In to add comment