title: Selecting data in Firebase
body: <p>Saw the Firebase / Angular video you did and immediately got very excited about the project I have just started. One thing I am struggling to get my head around is how to select data at sub-levels. What I mean is: say I had something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/EaFLy.png" alt="Firebase data screenshot"></p>
  
  <p>How can I select all records with the agent 'agent_1' and/or records with the box_id greater than 600 (plus other fields) without creating lots of indexes for each search term? I don't really want to download all the data to the client and then loop through the records as there will eventually be a lot of data. </p>
  
  <p>Eventually, the app should be able to filter data on different fields simultaneously. For example, I would have a select box for agents, which may return all the agent_1 records. Then I would add the filter 'all boxes with id > 600' and then perhaps 'box weight > 24kg' etc.</p>
  
  <p>It seems from what I have read, this is only possible by having an id field for each record, and then an index dataset for each field one would like to search against. This is simple enough for one field. However, I guess the only way to filter the data with further fields would be to get the ids on the next index dataset and do the filtering on the client. </p>
  
  <p>Am I right in this approach? It seems quite long-winded. </p>
  
  <p>What would be awesome would be to be able to do this:
  <a href="https://xxxxx.firebaseio.com/boxes/?agent=agent_1/?box_id" rel="nofollow noreferrer">https://xxxxx.firebaseio.com/boxes/?agent=agent_1/?box_id</a>>600</p>
  
  <p>Just a thought! :-)</p>
  
  <p>Thanks!</p>