title: How to compare a key in Firebase?
body: <p>I have structured my Firebase DB like this:</p>
  
  <pre><code>SOMETHING
      USERID (&lt;- unique)
          TIMESTAMP  (&lt;- unique within USERID)
              SOMETHING: 'something',
              SOMETHING: 'something'
  </code></pre>
  
  <p>How can I compare <code>USERID</code> to another <code>ID</code> in my code?</p>
  
  <p>I have tried (with no luck - it returns a JSON with a lot of strange objects in it):</p>
  
  <pre><code>let id = 337462940
  let exist = Firebase.database().ref(`SOMETHING/${id}`)
  
  if (exist) {
      //DO SOMETHING
  }
  </code></pre>