title: I am trying to access the values of a particular key from the Firebase database.I want to update those values and update it
body: <p>[This is my json data<a href="https://i.stack.imgur.com/7sX2n.png" rel="nofollow noreferrer">This is my code</a> <a href="https://i.stack.imgur.com/M22dF.png" rel="nofollow noreferrer">][1]</a></p>
  
  <p>I am trying to change the value of the key-value pair in the Firebase database.
  Lets suppose I have a key value like this:"chemistry":"20".I want to extract the value of the key chemistry and want to update it after adding some number like I add 10 to it so my final key value pair will become "chemistry":"30" .But I am unable to access the key can someone help me with this.</p>
  
  <p>My code goes here:</p>
  
  <pre><code> mAuth.signInWithEmailAndPassword(email, password)
                  .addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                          if (task.isSuccessful()) {
                              // Sign in success, update UI with the signed-in user's information
                              Log.d("TAG", "signInWithEmail:success");
                              //extracting the current user from the databse
                              FirebaseUser user = mAuth.getCurrentUser();
                              //getting the uid of the user
                              String Uid=user.getUid();
                              //getting the databse instance for the particular user
                              FirebaseDatabase database = FirebaseDatabase.getInstance();
                              //setting the path to the Users/Uid to read the key values
                              DatabaseReference myRef = database.getReference("Users/"+Uid);
  
  
                              //textView.setText(myRef);
                              String key=myRef.child("chemistry").getKey();
                              textView.setText(key);
  
                             // myRef.setValue("Hello, World!");
                          } else {
                              // If sign in fails, display a message to the user.
                              Log.w("TAG", "signInWithEmail:failure", task.getException());
                              Toast.makeText(TestActivity.this, "Authentication failed.",
                                      Toast.LENGTH_SHORT).show();
                              //updateUI(null);
                          }
  
                          // ...
                      }
                  });
  </code></pre>
  
  <p>my json is here:</p>
  
  <pre><code>{
    "Users" : {
      "LMn5GeZixNQNpdQhGzdKNbTgIw53" : {
        "chemistry" : "20",
        "email" : "umairnsr87@gmail.com",
        "lastScore" : "0",
        "maths" : "0",
        "name" : "umair",
        "phone" : "123456789",
        "physics" : "0"
      }
    }
  }
  </code></pre>