Consider a collection of users
. Each document in the collection has name
and email
as fields.
{
\"users\": {
\"uid1\
Just wanted to share because I read that you were hoping for a Firestore based solution.
This worked for me. forEach will query each document in the collection and you can manipulate as you like.
db.collection("collectionName").get().then(function(querySnapshot) {
querySnapshot.forEach(async function(doc) {
await db.collection("collectionName").doc(doc.id).set({newField: value}, {merge: true});
// doc.data() is never undefined for query doc snapshots
console.log(doc.id, " => ", doc.data());
});
});