Total newb question. Say I have 2 maps
val map1 = Map(\"ram\"->\"2gb\", \"size\"->\"15\", \"color\"->\"red\", \"fruit\"->\"strawberry\") val map2 =
If you don't want to duplicate your collections,
map2.forall{ case (k,v) => map1.get(k).exists(_ == v) }
You check everything in map2 by looking up the key in map1, returning an option, and checking that the value is there and what it should be.
map2
map1