Answers for "how to get key and value from dict in swift ios"

0

swift dictionary get key from valye

let dict: [Int: String] = [1: "one", 2: "two", 4: "four"]

if let key = dict.someKey(forValue: "two") { 
    print(key)
} // 2
Posted by: Guest on October-15-2020

Code answers related to "how to get key and value from dict in swift ios"

Code answers related to "Swift"

Browse Popular Code Answers by Language