【发布时间】:2020-11-18 20:45:36
【问题描述】:
有什么方法可以查询 firebase firestore 中的字符串值数组,该数组应包含两个字符串 a 和 b 但字符串 b必须在字符串 a 之后列出?
示例: 我有两个要查询的字符串值:
a = "12345"
b = "67890"
我在 firebase firestore 中存储了多个文档,如下所示:
document1 = {
id: "randomId1",
// ...other stuff
array: ["12345","345", "67890"]
}
document2 = {
id: "randomId2",
// ...other stuff
array: ["67890","345","12345"]
}
现在我只想在查询结果中获取 document1,因为值 b 列在数组部分中的值 a 之后。我该怎么做?
【问题讨论】:
标签: javascript firebase google-cloud-firestore