how to delete a Document Field in Cloud Firestore? ... I'm using the code below but I can not.
this.db.doc(`ProfileUser/${userId}/followersCount/FollowersCount`).update({
[currentUserId]: firebase.firestore.FieldValue.delete()})
Anyone know how to do it?
You can try as shown below:
Another solution that comes to my mind is, instead of focusing on updating the document deleting the field, update the entire document. Such as:
Also, instead of initializing that field you may simply not include it.