Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
Realtime Database Web: Is it possible to only get values?

I have a realtime db entries as shown below:

{
        <FIREBASE_GENERATED_KEY>:{username:<NAME>,message:<TEXT>,time:<TIMESTAMP>},
        <FIREBASE_GENERATED_KEY>:{username:<NAME>,message:<TEXT>,time:<TIMESTAMP>},
        ...
}

I am interested in getting only the values ordered by time in descending order and displaying them on UI. In Admin SDK I would do something like:

rdb
      .ref(`${rdb_paths.funfuse_connected_users}/${loc}`)
      .orderByValue('time')
      .get()

I see there's a method orderByValue but It doesn't take any arguments. How can we use orderByValue or anything to just get values instead of the entire object?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The Firebase Realtime Database always returns complete nodes from the JSON, or a set of complete child nodes that math a certain condition. There is no way to get a subset of the properties for each child node.

If you find yourself regularly needing only the time property of each child node, consider adding another branch to your database where you just keep the time values.

So:

"Original_data": {
        <FIREBASE_GENERATED_KEY>:{username:<NAME>,message:<TEXT>,time:<TIMESTAMP>},
        <FIREBASE_GENERATED_KEY>:{username:<NAME>,message:<TEXT>,time:<TIMESTAMP>},
        ...
},
"Times": {
        <FIREBASE_GENERATED_KEY>: <TIMESTAMP>,
        <FIREBASE_GENERATED_KEY>: <TIMESTAMP>,
        ...
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!