0

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);
      });
  });

This the database: enter image description here

Brandon Pillay
  • 986
  • 1
  • 12
  • 28

1 Answers1

1

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?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441