I'm trying to get all the ids of all documents from a parsed collection without being charged for getting the document data. Will I be charged for receiving the data if I use this code below?
db.collection("owners").get().then(function(querySnapshot) {
querySnapshot.forEach(function(doc) {
console.log(doc.id);
});
});
Yes, you will be changed a document read for each of documents in the collection. There's no way to do this without reading the documents.
How to get a list of document IDs in a collection Cloud Firestore?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.