檢索嵌套數據我有一個火力點的結構是這樣火力地堡:來自未知孩子
"broadcast": {
"ghjghjFc1S3KO0y8yJwORdfgret": { //user ID
"ryrtybgzMiI858YyGua": { //broadcast ID
"a": "xxx", // broadcast Detail
"b": "yyy",
"c": false
}
"cbvbcvbMvAnSDqTb15vU": { //broadcast ID
"a": "xxx", // broadcast Detail
"b": "yyy",
"c": true
}
}
"3uqWZJRFc1S3KO0y8yJwORTMtWC2": { //user ID
"jkhjkbgzMiI858YyGua": { //broadcast ID
"a": "xxx", // broadcast Detail
"b": "yyy",
"c": false
}
"qwwerqweMvAnSDqTb15vU": { //broadcast ID
"a": "xxx", // broadcast Detail
"b": "yyy",
"c": true
}
}
}
我想檢索具有廣播其中c等於真正的所有節點。我怎樣才能迅速做到這一點?你可以這樣做
對於所有的用戶或單個用戶? –
@NiravD謝謝。我已經試過這個查詢,但我什麼都沒有(snapshot.childrenCount = 0) –
@ user7814783其實我想檢索所有用戶沿他們的廣播,但只有那些'c'等於真的 –