答案 0 :(得分:2)
你可以这样做:
DatabaseReference dbRef = FirebaseDatabase.getInstance().getChild("ID I know").getChild("request");
dbRef.addListenerForSingleValueEvent(
new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
// Here you will iterate over all the values whose ID you wont know
Map<String, Object> values = dataSnapshot.getValue();
// Iterate over the values and for each value check if it has the child you need in it
}
@Override
public void onCancelled(DatabaseError databaseError) {
// on error
}
});