title: How to retrieve data and specific user data from the Firebase
body: <p>I am having problem in retrieving data from firebase. I have one root user's node and then inside that root I have one userID child node. Inside that child node I am storing user information according to its blood group.</p>
  
  <p>Now, what I want is to fetch the name and email according to blood group, say fetch all user data whose blood group is B+.</p>
  
  <p>Also, please tell me on how to fetch all entries in the firebase and show on textView.</p>
  
  <pre><code>    //show data on text view
      datashow.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Log.i("inside click", "onClick: ");
              FirebaseDatabase database = FirebaseDatabase.getInstance();
              DatabaseReference db = database.getReference();
              db.child("users").addValueEventListener(new ValueEventListener() {
                  @Override
                  public void onDataChange(DataSnapshot dataSnapshot) {
                      User user = dataSnapshot.getValue(User.class);
                      if (user == null) {
                          Log.e(TAG, "User data is null!");
                          return;
                      }
                      Iterable&lt;DataSnapshot &gt; children = dataSnapshot.getChildren();
                      Log.i("children", "onDataChange: " + children);
                      for(DataSnapshot child : children)
                      {
                          Map&lt;String , String&gt; map = (Map)child.getValue();
                          Log.i("inside", "onDataChange: " + map);
                          name  = map.get("name");
                          email = map.get("email");
                          dateof = map.get("userDob");
                          showData(name , email  , dateof );
                          Log.i("datasnap", "onDataChange: data snapshot " + name + email + dateof);
                      }
                  }
  
                  @Override
                  public void onCancelled(DatabaseError databaseError) {
  
                  }
              });
          }
      });
  </code></pre>
  
  <p>this is my snapshot for Firebase database</p>
  
  <p><a href="https://i.stack.imgur.com/zrkaz.png" rel="nofollow noreferrer">enter image description here</a></p>