Firebase에서받은 다음 데이터가 있습니다. 내 snapshotValue를 NSDictionary로 만들었습니다.Swift 3.0에서 중첩 된 NSDictionary 값에 액세스
self.ref.child("users").child(facebookID_Firebase as! String).observeSingleEvent(of: .value, with: { (snapshot) in
let snapshotValue = snapshot.value as? NSDictionary
print(snapshotValue, "snapshotValue")
//this line of code doesn't work
//self.pictureURL = snapshot["picture"]["data"]["url"]
}) { (error) in
print(error.localizedDescription)
}
나는 How do I manipulate nested dictionaries in Swift, e.g. JSON data?, How to access deeply nested dictionaries in Swift 및 기타 솔루션 아직 행운을 시도했다.
데이터 키와 그림 키 내의 url 값에 어떻게 액세스합니까?
Firebase에서 다른 참조를 만들고 값을 가져올 수 있지만 다른 요청을 저장하려고합니다.
이 BTW 중포 기지가 또 다른 요청을 보내지 않습니다. 모든 mombo jambo는 Firebase 클라이언트 자체에서 처리됩니다. –
@CemalEker Oh gotcha! 나는 그 말을 잘못했다. –
하시기 바랍니다이 대답을 확인하십시오 https://stackoverflow.com/a/43715807/3806350 –