title: Search child nodes in firebase database using android
body: <p>Hello guys here is my firebase database:</p>
  
  <p><img src="https://i.stack.imgur.com/AnqBQ.png" alt="Pic of my Firebase database"></p>
  
  <p>I want to get list of all medicines with particular symptoms.</p>
  
  <p>Here is my code i.e what i have done</p>
  
  <pre><code>public void initializeMedicineListener(String node,String type,String value){
      mDatabase=mFirebaseInstance.getReference();
      Query query = mDatabase.child("Medicine").child("symptoms").orderByChild("name").equalTo("Neck pain");
      query.addListenerForSingleValueEvent(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              medicineList=new ArrayList&lt;Medicine&gt;();
              if (dataSnapshot.exists()) {
                  for (DataSnapshot medicine : dataSnapshot.getChildren()) {
                      Medicine data = medicine.getValue(Medicine.class);
                      medicineList .add(data);
                  }
              }
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
  
          }
      });
  }
  </code></pre>
  
  <p>But i am getting null results.
  Please guide me guys.Am i doing something wrong??</p>