title: Query based on multiple where clauses in Firebase
body: <pre class="lang-json prettyprint-override"><code>{
    &quot;movies&quot;: {
      &quot;movie1&quot;: {
        &quot;genre&quot;: &quot;comedy&quot;,
        &quot;name&quot;: &quot;As good as it gets&quot;,
        &quot;lead&quot;: &quot;Jack Nicholson&quot;
      },
      &quot;movie2&quot;: {
        &quot;genre&quot;: &quot;Horror&quot;,
        &quot;name&quot;: &quot;The Shining&quot;,
        &quot;lead&quot;: &quot;Jack Nicholson&quot;
      },
      &quot;movie3&quot;: {
        &quot;genre&quot;: &quot;comedy&quot;,
        &quot;name&quot;: &quot;The Mask&quot;,
        &quot;lead&quot;: &quot;Jim Carrey&quot;
      }
    }
  }
  </code></pre>
  <p>I am a Firebase newbie. How can I retrieve a result from the data above <strong>where <code>genre = 'comedy'</code> AND <code>lead = 'Jack Nicholson'</code></strong>?</p>
  <p>What options do I have?</p>