I want to update a score value within a specific collection that is within a document called competitions.
I would like to update a specific collections data values, but it gives me this error:
FirebaseError: Expected type 'gc', but it was: a custom yc object
My query is probably wrong, but how can I update a specific value within a collection?
const colRef= query(collection(db, 'competitions/'+id+'/scorecard'), where("id", "==", scorecardid));
return updateDoc(colRef, {finalscore:300}, { merge: true });
Underneath you can see the db struncture from competitions to scorecards the get a scorecard spesific id and the you want to update that scorecard finalscore.
