title: How to get the multiple key from a single child value in firebase?
body: <p>I want to get the multiple keys from firebase real-time database using single value.
  Main node is "Orders" then it has node of "userkey" then it has node of "orderkey". orderykey contains two nodes 'orderdetails' and 'orderitems'.</p>
  
  <p>Now what i want is to get the 'userkey' &amp; 'orderkey' using only the specific value present in 'orderdetails'.<br>
  <a href="https://i.stack.imgur.com/u3mho.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u3mho.png" alt="enter image description here"></a></p>
  
  <p>I have tried it using two for-each loops but its returning all keys.
  This is what i tried.</p>
  
  <pre><code>    myRef.orderByValue().equalTo("orderStatus").addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
              for (DataSnapshot datas : dataSnapshot.getChildren()) {
                  Log.v("orderKey2", datas.getKey());
  
                  for (DataSnapshot datas2 : datas.getChildren()) {
  
                      Log.v("orderKey3", datas2.getKey());
  
                  }
              }
          }
  
          @Override
          public void onCancelled(@NonNull DatabaseError databaseError) {
  
          }
      });
  </code></pre>
  
  <p>But its returning all the keys of first child and all the keys of second child.</p>
  
  <p><strong>NOTE:</strong> These keys are only push keys used for insert NOT firebase auth keys.</p>