E
E
evg_962018-02-27 06:27:41
React
evg_96, 2018-02-27 06:27:41

How to request an element from a firebase collection?

There is a collection in firebase:
5a94d00cc8637758803371.png
How to query one element by id?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Aleksandrovich, 2018-02-27
@evg_96

https://firebase.google.com/docs/database/web/read...
is the documentation. Here you can find answers to 60% of questions.

firebase.database().ref('/catalog/' + Need ID ).once('value').then(function(snapshot) {
  var data = snapshot.val()
console.log("data",data)
  // ...
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question