Skip to content
Back

how do i refer to the Document ID in a list documents query

  • 0
  • Databases
  • React Native
  • Storage
kingcoder137731
17 Apr, 2025, 20:19

file 1: const response = await database.listDocuments(dbId, colId, queries); file 2: const response = await databaseService.vnmDocument(dbId, colId, [Query.equal('id', docId)]);

TL;DR
To refer to the Document ID in a list documents query, developers can use the attribute `$id`. In file 2, developers can update the query to reference the Document ID using `[Query.equal('$id', docId)]`.
Kenny
17 Apr, 2025, 20:38

use the attribute $id

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