My Firebase Realtime Database is like this :
{Singer :
Billie Eilish :
01 :
songType : \"type01\"
songName : \"bad guy\"
why don't you just go with fetch data which contains only songType : type01 try this
DatabaseReference reference = FirebaseDatabase.getInstance().getReference();
Query query = reference.child("Singer").orderByChild("songType").equalTo("type01");
query.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if (dataSnapshot.exists()) {
for (DataSnapshot issue : dataSnapshot.getChildren()) {
//set featched value to recyclerview
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});