How to check if a dictionary is empty in Swift

1 Answer

0 votes
var dict : [String: String] = [:]

print(type(of : dict))
print(dict.isEmpty)




/*
run:

Dictionary<String, String>
true

*/

 



answered Jun 14, 2023 by avibootz

Related questions

1 answer 102 views
1 answer 97 views
1 answer 193 views
1 answer 180 views
180 views asked Sep 2, 2020 by avibootz
1 answer 200 views
...