【发布时间】:2019-12-06 09:33:49
【问题描述】:
您好,我正在实现包含数组的查询,但每次我尝试时都会得到空白快照。我的代码是:
getStation = () => {
const query = firebase
.firestore()
.collection('routes')
.where('station', 'array-contains', 'station_name ');
query.get().then(snapshot => {
console.log("snapshot", snapshot);
snapshot.docs.forEach(doc => {
alert("eri")
console.log("eryh", doc.data);
})
})
.catch(err => {
console.log('Error getting documents', err);
});
}
【问题讨论】:
标签: javascript google-cloud-firestore