Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- yourref.observeSingleEvent(of: .value, with: { (snapshot) in
- let value = snapshot.value as? NSDictionary
- let useremail = value?["Sender"] as? String ?? ""
- if useremail == "aa@bb.com"{
- //your local variable num
- num = num + value?["Number"] as? Int ?? 0
- }
- // ...
- }) { (error) in
- print(error.localizedDescription)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement