Driving me a bit crazy at this point. Trying to access imageName
, yet always comes up blank. Help most appreciated.
ref.observe(FIRDataEventType.value) {
(snapshot: FIRDataSnapshot!) in
if let result = snapshot.children.allObjects as? [FIRDataSnapshot] {
for child in result {
for child2 in child.children {
// NO ERROR, and NO VALUE RETURNED
let imageName = (child2 as? NSDictionary)?["imageName"] as? String ?? ""
// NO VALUE RETURNED - LOOKING TO GRAB imageName HERE
print("imageName: \(imageName)")
}
}
}
}