Check out example codes for "create dictionary swift". It will help you in understanding the concepts better.

Code Example 1

var someDict:[String:Int] = ["One":1, "Two":2, "Three":3] // creates dictionary
var someVar = someDict["One"] // accesses the value of key "One"

print("The value of key = One is \(someVar)")

Learn ReactJs, React Native from akashmittal.com