我无法访问NSDictionary中的值,我想阅读“user5”键的值,我无法弄清楚正在发生什么或如何访问此值,我附上了由我创建断点时的调试器:[Here] [1]
感谢您的任何帮助,您可以提供 :)
你可以试试
if let va = values["LMN9xAUOcgsw4c6GJb4"] as? [String:Any] {
if let users = va["users"] as? [String:Any] {
if let user = users["user5"] as? String {
print(user)
}
}
}
let data = NSDictionary()
print((datat.value(forKey: "Key1") as! NSDictionary).value(forKey: "Key2") as! String)