Delete Field in Firestore Document
问题 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? 回答1: You can try as shown below: //get the reference to the doc let docRef=this.db.doc(`ProfileUser/${userId}/followersCount/FollowersCount`); // Remove the 'currentUserId' field from the document let removeCurrentUserId = docRef.update({