title: Retrieve all data from Firebase Database
body: <p>ANDROID: I have a Firebase database like this.<a href="https://i.stack.imgur.com/O66xm.png" rel="nofollow"><img src="https://i.stack.imgur.com/O66xm.png" alt="phoot"></a></p>
  
  <p>In my app, I would like to compile an arraylist that displays all values from the <code>nameofEntry</code> [DESCRIBED BELOW]. By this I mean the "balso," the "nairboh" and so on. </p>
  
  <p>I have the references:</p>
  
  <pre><code>DatabaseReference root = FirebaseDatabase.getInstance().getReference();
  DatabaseReference users = root.child("Users");
  DatabaseReference childRef = users.child(userID);
  DatabaseReference childRefNameNode = childRef.child(nameOfEntry);
  childRefNameNode.child(nameOfEntry).setValue(nameOfEntry);
  </code></pre>
  
  <p>//FETCH DATA</p>
  
  <pre><code>childRefNameNode.child(nameOfEntry).addValueEventListener(new ValueEventListener() {
              @Override
              public void onDataChange(DataSnapshot dataSnapshot) {
                  String valueFromDB = dataSnapshot.getValue(String.class);
                  Log.i("Jimit", valueFromDB);
  
  
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
  </code></pre>
  
  <p>But this only fetches for one entry. How can I get more entries? [All of them]?</p>