Total newb question. Say I have 2 maps
val map1 = Map(\"ram\"->\"2gb\", \"size\"->\"15\", \"color\"->\"red\", \"fruit\"->\"strawberry\") val map2 =
You can convert a Map to a Set and then apply the subsetOf method.
Map
Set
subsetOf
val map1 = Map("ram"->"2gb", "size"->"15", "color"->"red", "fruit"->"strawberry") val map2 = Map("ram"->"2gb", "size"->"15", "color"->"red") map2.toSet subsetOf map1.toSet // res0: Boolean = true