title: Get the child object of a limit(1) query on firebase database
body: <h3>I have this data</h3>
  <p><a href="https://i.stack.imgur.com/ocQJH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ocQJH.png" alt="enter image description here" /></a></p>
  <h3>I do this query</h3>
  <pre><code>firebase.database().ref(${path}/buy)
    .orderByChild('price').limitToFirst(1)
    .once('value')
    .then(snapshot =&gt; console.log(snapshot.val()))
  </code></pre>
  <h3>And I get this result</h3>
  <p><a href="https://i.stack.imgur.com/2yjzF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2yjzF.png" alt="enter image description here" /></a></p>
  <h3>Then the question is</h3>
  <blockquote>
  <p>Is there an easy way to access the price attribute of the <em>one</em> object whose key I don't know?<br />
  e.g. <code>snapshot.first().price</code> or <code>snapshot.only().price</code></p>
  </blockquote>
  <p>Simply put, I want to avoid this</p>
  <pre><code>var result = snapshot.val()
  var key = Object.keys(result)[0]
  var price = result[key].price
  </code></pre>