0

Is it possible to query a Firebase List on multiple keys and values, I have list look like following

{
  -key1: {
    type: 'type1',
    completed: false
  },
  -key2: {
    type: 'type2',
    completed: true
  },
  -key3: {
    type: 'type2',
    completed: false
  }
}

Is it possible to fetch all from the list that contains both type equals type2 and completed is true

following is my code

let end = FIREBASE.LIST_END;
this._angularFireDatabase.list( end, {
  query: {
    orderByChild: QUERYABLES.TYPE,
    equalTo: type
  }
});

but this will only query on types how could I add the other key completed too?

1 Answer 1

1

No Firebase only supports queries on a single attribute. You could make "composite keys" for yourself though.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.