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
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...