title: How to get the value of a child in Firebase?
body: <p>I am trying to get the riderId value from my database:</p>
  
  <p><a href="https://i.stack.imgur.com/Jx0Ig.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jx0Ig.png" alt="enter image description here"></a></p>
  
  <p>The code I am using to get it:</p>
  
  <pre><code>Query query = FirebaseDatabase.getInstance().getReference(Common.user_rider_tbl);
              query.addValueEventListener(new ValueEventListener() {
                  @Override
                  public void onDataChange(DataSnapshot dataSnapshot) {
                      riderId = String.valueOf(dataSnapshot.getChildren().child("riderId"));
                      Log.d(TAG, "riderId = " + riderId);
                  }
  </code></pre>
  
  <p>What am I doing wrong to get the value of riderId?</p>
  
  <p><strong>json</strong></p>
  
  <pre><code>"Riders" : {
    "C0RjB5NPZcTvWz9XiUAhpTDOK0C2" : {
      "avatarUrl" : "https://firebasestorage.googleapis.com/v0/b/ryyde-sj.appspot.com/o/images%2Friders%2F0badce3c-e75b-4d52-88e1-d2009090fb73?alt=media&amp;token=5ca59575-54ce-401e-ac27-c1d4e6a5f94c",
      "email" : "rider@me.com",
      "name" : "Rider1",
      "password" : "zzzzzz",
      "phone" : "665",
      "rates" : "0",
      "riderId" : "C0RjB5NPZcTvWz9XiUAhpTDOK0C2"
    },
  </code></pre>