This should be easy and there are a lot of similar questions but nothing works for me.
Here is my code and should print a snap shot but doesn't.
override func viewDidLoad() {
super.viewDidLoad()
let Ref = Database.database().reference(withPath: "Exhibitors-List/join").queryOrdered(byChild: "joinID").queryEqual(toValue:"1-22")
ref.observe(.value, with: {
snapshot in
var newItems: [Exhibitors] = []
for item in snapshot.children{
print(snapshot.value as Any)
let joinItem = Exhibitors(snapshot: item as! DataSnapshot)
newItems.append(joinItem)
}
self.items = newItems
self.tableView.reloadData()
})
}
I have no problem getting a snapshot when searching one child up in idComp or boothLocation but not in joinID, so is it my code or is my Firebase structure off?