📌  相关文章
📜  如何在 Firestore 中查询 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:04.382000             🧑  作者: Mango

代码示例1
db.collection("cities").where("capital", "==", true)
    .get()
    .then(function(querySnapshot) {
        querySnapshot.forEach(function(doc) {
            // doc.data() is never undefined for query doc snapshots
            console.log(doc.id, " => ", doc.data());
        });
    })
    .catch(function(error) {
        console.log("Error getting documents: ", error);
    });