"firebase": "^9.18.0", "react-native": "0.71.3"
Lets suppose I have this collection: entity
{
status : 'xy',
city : {
name: 'abc',
}
}
Im trying to achieve this kind of query or some similiar one.
import { app, db, getFirestore, collection, addDoc } from "./firebase-config";
import { getDocs, query, where, orderBy, startAt } from "firebase/firestore";
const entityQuery = query(
collection(db, 'entity'),
where("status", "==", "xy"),
orderBy("city.name"),
startAt('ab'),
)
I need to check first of all if the city.name is equal to 'abc' AND status starts with "x"
Of course this query is not correct but im trying only to explain in details my needs. thx in advance.
I need to run this query and perform the first "where" condition AND (all city.name that starts with 'ab')
I searched a lot in stackoverlfow but with no success.