Back

[Basic] How do i get the info on the basic of array [] list of users id

  • 0
  • Web
iankit.me
21 May, 2023, 11:07

for e.g I have this collection called "tweets" inside it i have an attribute called "likes" which is type of an array string [] i have there bunch of users id. When i want to query it, I want to have a info of the each users as well. Can anyone help on on this?

TL;DR
The user wants to get information about each user in an array of user IDs. They have a collection called "tweets" with an attribute called "likes" that contains an array of user IDs. They are looking for a way to query this and retrieve the information of each user. One suggestion is to create a cloud function that takes the user ID as input and returns the user data. In the frontend code, they can loop over the array of user IDs and execute the function for each ID to get the user information.
safwan
21 May, 2023, 11:23

you can create a cloud function to get the user's data by inputting their id.

in your fromtend code, loop over the array of user ids, and execute the function, which will return the user data

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