【发布时间】:2020-06-14 11:22:59
【问题描述】:
我正在使用一个函数来检查我的集合中文档中的值(值)是否与字符串数组(this.values)中的值相同,但我无法返回此条件的真实值字符串格式。
Function() {
this.afs.collection('nameCollection', ref => ref.where( 'value', "in" , this.values
)).snapshotChanges().subscribe(res => {
if(res.length > 0
{
console.log(res.toString()) // <--------------------------
}
});
}
结果
console.log : [object Object],[object Object],[object Object]
我应该怎么做才能以字符串格式返回值?
【问题讨论】:
标签: firebase google-cloud-firestore ionic4