【发布时间】:2021-05-21 17:39:56
【问题描述】:
我想将我所有的文档 ID 转换为一个数组,以便执行array.includes() 查询。
这是我的代码 -
this.db.collection('camps', ref => ref.where('id', '==', "fxvb95"))
.snapshotChanges().subscribe(data => {
data.forEach(doc => {
const y = doc.payload.doc.data()['altUID'];
console.log(y)
});
这是日志中的结果
exampleUID1
exampleUID2
如何将这些更改为单个值或数组?
【问题讨论】:
标签: angular typescript firebase google-cloud-firestore