I have this firestore query:
db.collection("cities").where("capital", "==", true)
It returns all documents from the colletion cities
that match the where clause, as expected. However, how can I get the names (or: ids?) of the documents that are returned?
I use the query with vue.js and vuexfire like this:
bindCities: firestoreAction(({ bindFirestoreRef }) => {
var query = db.collection("cities").where("capital", "==", true)
return bindFirestoreRef("cities", query);
}),
doc.id
would help you get the document id/name.