A
A
Andrey Okhotnikov2021-05-02 10:16:21
firebase
Andrey Okhotnikov, 2021-05-02 10:16:21

Firebase search by id?

Reviews are stored in the firebase database, each review has an author field with id and name
fields

firebase
    .database()
    .ref('reviews')
    .once('value', (snap: any) => {
      
    })
    .catch((err) => {})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tehfreak, 2021-05-03
@tehfreak

Like this:

const authorId = 1
firebase
  .database()
  .ref('reviews')
  .orderByChild('authorId')
  .equalTo(authorId)
  .once('value')
  .then((snapshot) => {

  })
;

And here is the documentation: https://firebase.google.com/docs/database/web/list...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question