I'd like to add/set elements of a mutable map with specific key-value pairs. So far, I figured out that I can can add new elements using the plus operator along with the Pair data type:
var arr3:Map<Any, Any> = mutableMapOf()
arr3 += Pair("manufacturer", "Weyland-Yutani")
//also, the "to" operator works too:
//arr3 += ("manufacturer" to "Weyland-Yutani")
However, I couldn't find out how to modify or add new key-value pairs:
arr3["manufacturer"] = "Seegson" // gives an error( Kotlin: No set method providing array access)
arr3["manufacturer"] to "Seegson" // compiles, but nothing is added to the array
Could you please elaborate me how to do that?