Back

Response Depth Relational Database

  • 0
  • REST API
carlvee
16 Nov, 2024, 00:55

if say I have a response that looked like this

{ "level 1" : "level 1", "level 2" : [ { "name" : "example name", "$id" : "32n1jnabsjdf", "level 3" : [ { "name": "name", "$id":"id", createdAt..., updatedAt..., other... } ] createdAt..., updatedAt..., other... } ]

Is there a way I can query it so it ONLY returns the level 2's name and id, also level 3's name and id, for example when I call getDocuments or listDocuments?

TL;DR
Developers are attempting to query a response in a relational database to return only specific fields such as level 2's name and id, and level 3's name and id when using getDocuments or listDocuments. This can be achieved by specifying the desired fields in the projection parameter of the query.
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