Back

how to query by attribute value

  • 0
  • Web
bonndubz
17 Jan, 2024, 17:44

so i have my queries here, i wanna do something so i can get data that matches the value of one attribute from the documents called "respondingto"

i wanna know if something like this is possible

TypeScript
const query = [
   Query.limit(10), 
   Query.orderDesc('$createdAt') 
   Query.attribute('respondingto', post.$id) // my idea of what it'd look like
];```
TL;DR
The developer is asking how to query data based on the value of an attribute called "respondingto". They provided a sample code and are wondering if it's possible to achieve this. They want to limit the results to 10 and order them in descending order based on a createdAt field. A solution is not provided in the thread.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more