Firebase Database Update creating a new node(duplicate node)when trying to update a specific node value



  • Hi!!! I have a users object, in that I am trying to update a specific node(status) by using the firebase update(payload) method. But when I try to do that, instead of updating the value in the parent node, it creates a new child node(duplicate node) with the value being updated there.

    let firebaseApp = firebase.initializeApp(firebaseConfig);
    let uniqueID = "OEHCrSnKFrd87JDivvA0sLMnj8u1"
    firebaseApp.database()ref("users/" + uniqueID).update({
        status: false
      })
    

    d1082af8-f4bf-41f5-9f46-1dadaf745277-image.png

    Can someone please let me know what I am missing here?


Log in to reply