I want to merge these queries with AND logical operator, so I just get the data that fulfilled these 2 conditions
.where("venueSportType", "in", sportFilter) .where("fieldFloorTypeSearch", "array-contains-any", floorFilter)
I was trying using nested where
like this
ref .where("venueSportType", "in", sportFilter) .where("fieldFloorTypeSearch", "array-contains-any", floorFilter) .onSnapshot((snapshot) => { snapshot.forEach((doc) => { items.push(doc.data()) }) setLoading(false) })
but it comes to an error like:
FirebaseError: Invalid query. You cannot use 'array-contains-any' filters with 'in' filters.