title: Getting node names from Firebase database based on emailId match
body: <p>I have the below Json schema , what firebase query can I use to get the node name(0153,0154) , I am able to get the name(joel,vikram,sachin) using once method    </p>
  
  <pre><code> "EmployeeInfo":
          {
          "0153":
          {
            "Name":"Joel",
            "Dept":"Engineering",
            "Email":"joel@dept.com"
          },
          "0163":
          {
            "Name":"Vikram",
            "Dept":"Engineering",
            "Email":"vikram@dept.com"
          },
           "0173":
          {
            "Name":"Sachin",
            "Dept":"Engineering",
            "Email":"Sachin@dept.com"
          }
  </code></pre>
  
  <p>Here is my javascript function :</p>
  
  <pre><code>function Call() {
  
    var dbref = new Firebase("https://logintrialapp.firebaseio.com/Employee/EmployeeInfo");
    var login = localStorage.getItem("Email");
    dbref
      .once("value")
      .then(function(snapshot) {
          snapshot.forEach(function(childSnapshot) {
              childData = childSnapshot.val();
              name = childData.Name;
              var n = login.localeCompare(name);
              console.log(name);
  
              if (n != 0) {
                  var eid = snapshot.val();
                  console.log("Hello" + eid);
              }
              console.log(snapshot.val());
          })
      })
  </code></pre>
  
  <p>with this code I am able to get the names but I want to retrieve the node names , what query can be used to get the nodes names based on emailid match criteria</p>
  
  <p>output:</p>
  
  <pre><code>Joel
   Checkworks.html:50 Hello[object Object]
      Checkworks.html:55 Object {0153: Object, 0163: Object, 0173: Object}0153: ObjectDept: "Engineering"Email: "joel@dept.com"Name: "Joel"__proto__: Object0163: Object0173: 
      Object__proto__: Object
      Checkworks.html:44 Vikram
      Checkworks.html:50 Hello[object Object]
      Checkworks.html:55 Object0153: ObjectDept: "Engineering"
      Email: "joel@dept.com"Name: "Joel"__proto__: Object0163
      : Object0173: ObjectDept: "Engineering"Email: "Sachin@dept.com"Name: "Sachin"__proto__: Object__proto__: Object
      Checkworks.html:44 Sachin
      Checkworks.html:50 Hello[object Object]
      Checkworks.html:55 Object {0153: Object, 0163: Object, 0173: Object}
  </code></pre>