title: How to update a child node that contains a specific value in the database
body: <pre><code>String userID = selectedCharacter.getUserID();
  String charID = selectedCharacter.getCharID();
  Character editedCharacter = new Character(userID, charID, name, hitPoints, armorClass, level, experience, gold);
  
              databaseRef                     
                      .orderByChild("charID")
                      .equalTo(selectedCharacter.getCharID())
                      .addValueEventListener(new ValueEventListener() {
                          @Override
                          public void onDataChange(DataSnapshot dataSnapshot) {
                              // Translate the character to a map of its data
                              Map&lt;String,Object&gt; updates = editedCharacter.toMap();
                              // Update ONLY the node with charID = editedCharacter.getCharID()
                              databaseRef.updateChildren(updates);
                          }
  
                          @Override
                          public void onCancelled(DatabaseError databaseError) {
                              throw databaseError.toException();
                          }
                      });
  </code></pre>
  
  <p>So I'm trying to update a character's stats in my firebase database. As you can see: </p>
  
  <p><a href="https://i.imgur.com/VvcViHU.jpg" rel="nofollow noreferrer">here</a></p>
  
  <p>the code I'm using is actually putting the update in character's root instead. What am I doing wrong here? I'm unsure of how to find the node with the key as I'm not storing the key anywhere.</p>