title: Conditional firebase query
body: <p><strong>I have a list of instances in my Firebase database, and I want to filter the list if and only if the the user chooses to filter the query. If the user doesn't choose to filter the query I just want to output all instances</strong></p>
  
  <p>What I am trying to do.</p>
  
  <pre><code>var ref = new Firebase("myfirebaseurl");
  
  if(condition){
    var query = ref.orderByChild("somechild").equalTo("conditionchosen");
  } else {
    var query = ref.orderByChild("somechild").equalTo(any value);
  }
  </code></pre>
  
  <p>Any way to do this?</p>