0

Firebase Database snapshot

Please see the attached image. As you see there 8 are tables. How can I fetch the latest user-entered data? I can fetch all data from one table but hows its possible to get only the latest entered data from the table individually ?**

Frank van Puffelen
  • 499,950
  • 69
  • 739
  • 734

1 Answers1

2

to get only the latest entered data from the table individually?

Simply by adding a Timestamp field under each object, ordering the results descending and finally passing 1 as a parameter to Query's limitToFirst(int limit) method.

Alex Mamo
  • 112,184
  • 14
  • 139
  • 167