Cloud Firestore: How to set a field in document to null

后端 未结 3 848
南笙
南笙 2021-01-24 20:00

I use a collection of documents that I use to identify user groups. My intention is to only fill in the document id field with the user id without having other useless fields in

3条回答
  •  渐次进展
    2021-01-24 20:31

    The following will work for the web:

            firebase.firestore().collection('abcd').doc("efgh").set({
                name: "...",
                nullField: null
            })
    

提交回复
热议问题