我的云Firestore数据库如下所示:
users
|
|----id----(name,age)
|----id----(name,age)
|----id----(name,age)
|----id----(name,age)
|----id----(name,age)
...
我正在通过所有元素编写查询:
db.collection('users').get()
.then(
(results) => {
results.forEach((doc) => {
//how to get the id that represents this doc?
});
response.json();
}
)
.catch(function (error) {
console.error("Error getting user: ", error);
response.send(error)
});
医生
医生