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 110 views
1 answer 107 views
1 answer 205 views
1 answer 197 views
197 views asked Sep 2, 2020 by avibootz
1 answer 211 views
...