I'm working with Firestore. The following code updates the matrix with a single element, that is, each time a user executes that function, said field is updated:
updateFavoritos(key) {
const user = firebase.auth().currentUser;
this.afs.doc('eventos/' + key).update({
favoritos: [ user.uid ],
});
}
But how can I do to add instead of updating that matrix, is to say something like this: