How to get a specific row of firebase query?

hello guys
im interested to know , can we get a specific row of a firebase query?

for example lets say we have an leaderboard query and i just want to get person #4 name and score , can you guide me please?

If you have the query order the documents, your query’s docs variable will be an array sorted from top player to lowest. You can simply get a specific index of the array, e.g. the 4th document in it would be at index 3, so you could get docs[3] to get that leaderboard entry’s document.

thank you dear @arthuro555 for your replying
it works thank you so much

i upload screen shot for who need
Thanks to @arthuro555
Screenshot 2023-01-23 101948

1 Like