title: Sort Collection Based on Sub Collection
body: <p>Im setting up a filestore on firebase.</p>
  
  <p>Lets say I have a Collection named countries with the names of the countries in it, inside it I have another collection named states and then Cities so, if I ask where do you live the person can say USA, whis is the doc AI897DJdjusKD8. Based on that I can do</p>
  
  <p>db.collection("cities").doc("AI897DJdjusKD8").collection("states").get</p>
  
  <p>and the person can select from it Texas which is doc DJDffjdi983uyeF and from it we have</p>
  
  <p>db.collection("cities").doc("AI897DJdjusKD8").collection("states").doc("DJDffjdi983uyeF").colection("city").get </p>
  
  <p>and from it the person can select a city, from example Huston, which is doc 5jsi73Fu3TG. Afer typing the address I do a different collection called address with the name of the street, the number of the building, the id of the city stated before and the user id. </p>
  
  <p>Question: Is there a way I can go backwards on the chain to show the information on display. Knowing the user id I know the addres, leading me to the city, which gives me the state and so on? So I can display:</p>
  
  <p>Name:</p>
  
  <p>Lastname:</p>
  
  <p>Address:</p>
  
  <p>City:</p>
  
  <p>State:</p>