let ref = Database.database().reference(withPath: "user")
ref.observeSingleEvent(of: .value, with: { snapshot in
if !snapshot.exists() { return }
print(snapshot) // Its print all values including Snap (User)
print(snapshot.value!)
let username = snapshot.childSnapshot(forPath: "full_name").value
print(username!)
})
答案 0 :(得分:2)
您需要添加查询:
ref.queryOrdered(byChild: "videoid").queryEqual(toValue: "12345").observeSingleEvent(of: .value, with: { snapshot in
更多信息: