title: Firebase, get immediate parent of a child with specific value
body: <p>I am working on an ios app with firebase backend. As users register, user node is created in firebase under which there are different children like email, name, avatar etc. What I am doing is that I am searching for some email in user nodes and if I find that email in some node, I want to get its parent key i.e -Ksdd23d2djhsdgjhs. See the image: <a href="https://i.stack.imgur.com/iA9wL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iA9wL.png" alt="image"></a></p>
  
  <p>I want to get the value with upper arrow if the email matches with the one I have. </p>
  
  <p>I have an email address and I am searching through all of the children in user node and then further check inside the to compare the email with the one I have. If email matches, I want to get its parent node like in the image it is Dn2LUAwdolg..... .</p>
  
  <p>I can get the first node under user node. Assume that the node Dn2LU.. shown in picture is at some unknown position and I have to search all users to get its name if it's email child value matches with the one I am comparing it with. </p>
  
  <p>Hope it's clear now</p>