Reputation: 19
I'm using a function to check whether the values (value) in the documents within my collection are the same as in a string arrays (this.values), but I'm unable to return the true values for this condition in string format.
Function() {
this.afs.collection('nameCollection', ref => ref.where( 'value', "in" , this.values
)).snapshotChanges().subscribe(res => {
if(res.length > 0
{
console.log(res.toString()) // <--------------------------
}
});
}
Result
console.log : [object Object],[object Object],[object Object]
What should I do to return the values in string format?
Upvotes: 0
Views: 37