how can i get key's value from dictionary in Swift?
I am early bird in swift. I have a dictionary.I want to get my key's value.Object for key method is not worked for me.Can anybody help me please? This is my dictionary; var companies = ["AAPL" : "Apple Inc", "GOOG" : "Google Inc", "AMZN" : "Amazon.com, Inc", "FB" : "Facebook Inc"] for (name) in companies.key { println(companies.objectForKey("AAPL")) } Prine With this method you see the key and the value. var companies = ["AAPL" : "Apple Inc", "GOOG" : "Google Inc", "AMZN" : "Amazon.com, Inc", "FB" : "Facebook Inc"] for (key, value) in companies { print("\(key) -> \(value)") } Or if you only