I got the following Firebase document:
{
"customField1": "customValue1",
"customField2": "customValue2",
"fieldToChange: "valueToChange"
}
I wish to know how to do two operations:
Find the document which has "customField1" set to "customValue1" and update "valueToChange" to something else.
Find the document which has "customField1" set to "customValue1" AND "customField2" set to "customValue2" and update "valueToChange" to something else.
How can I achieve this?
I only see options where you need the docId:
const uploadCollection = this.db.collection<any>('uploads');
return await uploadCollection.doc(docId).update({ 'fieldToChange': 'another value' });