JamesGJ
BuildShip2y ago
4 replies
JamesG

Filtering a Firestore call with OR condition

Hi, I'm trying to retrieve all documents with one or both of two booleans set to "true".

I've tried all sorts of variants on the below but no joy:

{
"condition": "OR",
"rules": [
{
"field": "behaviourist",
"operator": "==",
"value": true
},
{
"field": "trainer",
"operator": "==",
"value": true
}
]
}


Thanks in advance!
Solution
Hi @JamesG, Add the Filters in array: [{field:"user1",value:"test",operator:"=="},
{field:"user",value:"true",operator:"=="}] to set multiple filter in Firestore collection query.
Was this page helpful?