[Firebase]Getting all documents from one collection in Firestore

Getting all documents from one collection in Firestore

            const events = await firebase.firestore().collection('users')
            events.get().then((querySnapshot) => {
                const tempDoc = []
                querySnapshot.forEach((doc) => {
                    var data = doc.data();
                    console.log(data);
                    tempDoc.push(data);
                })
                console.log(tempDoc);
            })

投稿者: kinkun

保有資格 Salesforce Certified Platform App Builder T Salesforce Certified Platform Developer I Salesforce Certified Platform Developer II Salesforce Certified Administrator

コメントを残す

メールアドレスが公開されることはありません。