I want to get all the posts that have the key "type" equal to 1 or 2 this code doesn't work
@Override
public Query getQuery(DatabaseReference databaseReference) {
return databaseReference.child("posts").orderByChild("type").equalTo(1).orderByChild("type").equalTo(2);
}`
but this one works for only type 1:
@Override
public Query getQuery(DatabaseReference databaseReference) {
return databaseReference.child("posts").orderByChild("type").equalTo(1);
}
How can I have posts that contains both values for the key "type"