Get dictionary value for key

 Problem

I have a Dictionary and want to get a specific value, by key.



 Recipe


// Initialize the Dictionary
var dict = ["name": "John", "surname": "Doe"]

// Get element for key "name"

print(dict["name"])
				


 Playground