title: How can I order by child of a child? What options do I have if this is not possible?
body: <p>The basic structure of the data I'm working with is: </p>
  
  <pre><code>Claims: {
    "6B7CBFB4-16EA" : {
      "E4A5DB45-C1DE" : {
        "ID" : 3,
        "Store" : "Staples"
      }
    }
  </code></pre>
  
  <p>I also have some example data set up on this firebase <a href="https://torrid-inferno-3290.firebaseio.com/Claims" rel="nofollow">https://torrid-inferno-3290.firebaseio.com/Claims</a> as well as a jsfiddle <a href="https://jsfiddle.net/8j1zf7vd/" rel="nofollow">https://jsfiddle.net/8j1zf7vd/</a> </p>
  
  <p>I would like to be able to orderBy ID or Store</p>
  
  <p>The first two levels are randomly generated identifiers. What is currently being done is we are retrieving all of the data under the Claims ref and then sorting it client-side but as the app has grown this is becoming too much so we need to sort and restrict it server side. </p>
  
  <p>If this is not possible and I am only able to query on Child, what is the best way to flatten my data? This will be on a large production app so there will be a lot of data to move around. Does Firebase offer an easy way of accomplishing this?</p>