
i have an attribute called tags which is an array contains ["ForAbsoluteBegginers","superman", "batman", "Iron man"] inside the upload collection. now i wanted to only the the document if tags contains ForAbsoluteBegginers otherwise do not want. this is my code.
async CategoryBegginersInfo(Cateogry:string) {
try {
return await this.databases.listDocuments(
conf.appwriteDatabaseId,
conf.appwriteCollectionId,
[
Query.equal("category", Cateogry),
Query.equal("tags", ["ForAbsoluteBegginers"]),
Query.equal("status", "Approved") // Add this condition
]
);
} catch (error) {
console.error("appwrite service :: CategoryBegginersInfo :: ", error);
return false;
}
}
but it is returning me the empty document the only problem is with this line Query.equal("tags", ["ForAbsoluteBegginers"]), how to get only those document which tags includes ForAbsoluteBegginers
Recommended threads
- Exposing project id and endpoint on GitH...
Is it best practice to expose your project id and endpoint in your appwrite.js file when publishing an NextJS or Angular project. If you use a .env file, that i...
- Insights🐛 Bug Report: Missing Tables AP...
Hi. First time appwrite user. i'm building a new mobile app with react-native & expo and decided to use appwrite as a tech for this app. i found the react-nativ...
- Upgrading Appwrite 1.7.4 → 1.8.x: What H...
I'm currently running a self-hosted Appwrite v1.7.4 instance that still uses the old Collections/Documents database model. I noticed that starting from v1.8.x,...
