setValue() method by passing new value.
You can also use updateChildren() by passing the path to update data without disturbing other child nodes data.
For example, if you want to update only the user email, you can use below code block:
String newEmail = 'poke@gmail.com'; mDatabase.child( userId ).child( "email" ).setValue( newEmail ); |
removeValue() on a reference to the location of that data.
You can also delete by specifying null as the value for another write operation such as setValue() or updateChildren().
You can use this technique with updateChildren() to delete multiple children in a single API call.
|
“How can I be substantial if I do not cast a shadow? I must have a dark side also if I am to be whole.” ― C.G. Jung, Modern Man in Search of a Soul |