title: Querying in Firebase with equalTo condition not working
body: <p>I have database structure like this in Firebase</p>
  
  <p><a href="https://i.stack.imgur.com/FIyjU.png" rel="nofollow"><img src="https://i.stack.imgur.com/FIyjU.png" alt="enter image description here"></a></p>
  
  <p>I want to search a search on this structure based on key <strong>number</strong> and get the parent key in return. Meaning if i search for <strong>8860124421</strong> then i should get <strong>-KTEtSR7chN8te1WaW-W</strong> in return . </p>
  
  <p>I am doing it like this in android - </p>
  
  <pre><code>final String number = "8860124421";
  
  DatabaseReference global_user_entry_ref = ApplicationContext.getGlobalDataBaseReference()
                  .child("User-Entry-2").getRef();  //Reference to User-Entry-2 
  
  Query query = global_user_entry_ref.orderByChild("number").equalTo(number);  
  
              query.addListenerForSingleValueEvent(new ValueEventListener() {
                  @Override
                  public void onDataChange(DataSnapshot dataSnapshot) {
  
                      if(dataSnapshot != null){
  
                          for(DataSnapshot friend: dataSnapshot.getChildren()){
  
                              String firebase_id = (String) friend.getKey();
  
                              Log.d("ContactSync","handle number "+firebase_id+" "+number+" "+friend);
                          }
  
                          Log.d("ContactSync","handle number outer "+dataSnapshot);
                          //user exist
                      }
                      else {
                          //user_does_not_exist
                      }
                  }
  
                  @Override
                  public void onCancelled(DatabaseError databaseError) {
                      Log.d("ContactSync","handle number oncancel "+databaseError.getMessage());
                  }
              });
  </code></pre>
  
  <p>But I am not getting proper result , <strong>dataSanpshot</strong> in <strong>onDataChange</strong> looks like this - </p>
  
  <blockquote>
    <p>DataSnapshot { key = User-Entry-2, value = null }</p>
  </blockquote>
  
  <p>but i want to get dataSnapShot with parent of number key.</p>
  
  <p>Please help , Thanks in advance</p>