【发布时间】:2021-12-15 17:02:50
【问题描述】:
通过一个例子更容易解释。
有问题的数据是:
data : {
cluster1 : {
id: 123
things: [153, 525, 743]
},
cluster2 : {
id: 124
things: [113, 547, 124]
},
}
我们想找到所有包含“547”的集群,这种情况应该返回整个集群2。
我知道如何在 Firestore 中执行此操作,它看起来像这样:
db.collection("data")
.where("things", "array-contains", userInput)
但由于某些原因,我不能使用 firestore。
有谁知道在 Firebase 实时数据库中是否有办法做到这一点。
谢谢!
【问题讨论】:
标签: javascript firebase firebase-realtime-database