Answers for "how to compare two [String:Any] in swift"

0

swift compare strings

print("foo".elementsEqual("bar")) //false
Posted by: Guest on December-23-2020
0

how to compare two [String:Any] in swift

let actual: [String: AnyObject] = ["id": 12345, "name": "Rahul Katariya"]


var expected: [String: AnyObject] = ["id": 12346, "name": "Aar Kay"]


print(NSDictionary(dictionary: actual).isEqualToDictionary(expected))//False
Posted by: Guest on October-23-2021
0

how to compare two strings in swift

let str1 = "Hello, world!"
let str2 = "I love Swift."
let str3 = "Hello, world!"

// compare str1 and str2
print(str1 == str2)

// compare str1 and str3
print(str1 == str3)
Posted by: Guest on May-07-2021

Code answers related to "how to compare two [String:Any] in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language