Swift Language Dictionaries Change Value of Dictionary using Key


Example

var dict = ["name": "John", "surname": "Doe"]
// Set the element with key: 'name' to 'Jane'
dict["name"] = "Jane"
print(dict)