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
  • 565,676
  • 79
  • 828
  • 807

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
  • 130,605
  • 17
  • 163
  • 193