title: How do I retrieve the values of unknown keys within unknown children?
body: <p>I have a Firebase database that looks something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/DBrNo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DBrNo.png" alt="enter image description here"></a></p>
  
  <p>The children of <code>Entries</code> will have various unknown names and the keys/values within each of those children will also have various unknown names. I wish to retrieve all the child names and key names but am not sure how to double loop through the <code>DataSnapshot</code>. This is what I have been playing with so far:</p>
  
  <pre><code>    mDatabase = FirebaseDatabase.getInstance().getReference();
      mDatabase.child("Entries").addListenerForSingleValueEvent(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              for (DataSnapshot entries : dataSnapshot.getChildren()) {
                  for (Map&lt;String, String&gt; entry : entries.getValue().entrySet()){
                      Map singlePair = (Map) entry.getValue();
  </code></pre>
  
  <p>I know those last two lines are a mess but I'm not sure how to retrieve the content of the children? Any help would be much appreciated.</p>