I am trying some ways to completely delete the filed 1 when it is null when inserting data
For example: I'm 1 user A I have name, age and country is null But I don't want it to add a country field in the database
like this
db.collection("user").doc().set({
name: "A",
age: "18",
country: "" or country: null or country:'null'
}).then(() => {
console.log("Document successfully written!");
})
I want it like this
Collection(user)=>randomUid=>data(name:'A',age:'18')