title: Firebase nested value
body: <p>I am trying to query items in my firebase database based on an attribute value.</p>
  
  <p>Here is my structure:</p>
  
  <p><a href="https://i.stack.imgur.com/92NEl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/92NEl.png" alt="enter image description here"></a></p>
  
  <p>Here is my POJO object:</p>
  
  <pre><code>public class LapTime {
  
      private int vehicleType;
      private String track;
      private String user;
      private int time;
  }
  </code></pre>
  
  <p>And here is my query code:</p>
  
  <pre><code>mDatabase.child("lap-time").orderByChild("track").equalTo(mTrackUuid).addValueEventListener(new ValueEventListener() {
      @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              time = dataSnapshot.getValue(LapTime.class).getTime() + "ms");
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
  
          }
      });
  </code></pre>
  
  <p>My problem is that the datasnapshot I get back has for root <code>lap-time</code> and not the UUID, thus the <code>getValue(LapTime.class)</code> give me an empty object...</p>
  
  <p>Here is the datasnapshot I get:</p>
  
  <pre><code>DataSnapshot { key = lap-time, value = {-KXwSxD0GYVC6awV8abw={track=-KXwSxCeV2Ib4Gt4pvjy, time=105000, vehicle-type=0, user=ZQKwPfRF0mVL5jAO7FaSPcsF7t42}} }
  </code></pre>
  
  <p>And this is what I would like to get:</p>
  
  <pre><code>DataSnapshot { key = -KXwSxD0GYVC6awV8abw, value ={track=-KXwSxCeV2Ib4Gt4pvjy, time=105000, vehicle-type=0, user=ZQKwPfRF0mVL5jAO7FaSPcsF7t42}} }
  </code></pre>
  
  <p>How can I do that?</p>