In firestore documentation it says that merge: true
is needed if we want to merge data, it doesn't work
Here is my code, which is very similar to the example, it always replaces the old stored value with the new one
async function updateTotal() {
const update = await db.collection("resources").doc(id).update({ "total": "500"}, { merge: true })
}
I really need it if you have a solution please