title: Firebase: How do I retrieve records from my data for which a specific key exists?
body: <p>I have data in firebase that looks like this:</p>
  
  <pre><code>"application": {
    "companies": {
      "firebase": {
        "creation": {
          "name": "Firebase Inc",
          "location": "USA"
        },
  
        "google": {
          "creattion": {
            "name": "Google Inc",
            "location": "USA"
          }
        }
  
        "facebook": {
        },
  
        "apple": {
        }
      }
    }
  }
  </code></pre>
  
  <p>There are tens of thousands of records under <code>companies</code> key. How do i efficiently execute following queries?</p>
  
  <p>How do I query only the records for which key <code>creation</code> is present under their name?</p>
  
  <p>How do I query only the records that DO NOT have key <code>creation</code> present under their name?</p>
  
  <p>I also want to call <code>.on('child_added')</code> on the returned result set so that I can process only those specific records later on. Is it possible?</p>