I am trying to fetch my data based on 2 things. First, fetch where isFromCreator = true
. Second, fetch the results in terms of the latest 10.
My db structure looks like this:
ClubContent
CreatorID
clubID
postID: {isFromCreator: Bool}
I then attempt to fetch this content like this:
ref.child("ClubContent").child("jhTFin5npXeOv2fdwHBrTxTdWIi2").child("1622325513718")
.queryOrdered(byChild: "timestamp")
.queryLimited(toLast: 10)
.queryEqual(toValue: true, childKey: "isFromCreator")
.observeSingleEvent(of: .value, with: { (snapshot) in
The result returned however is an empty snapshot. What is going wrong?