Referring to the Firebase docs and example located here http://ift.tt/29REpId
Their docs say it should return all dinosaurs who's height is 25. It only returns one.
// Find all dinosaurs whose height is exactly 25 meters.
var ref = firebase.database().ref("dinosaurs");
ref.orderByChild("height").equalTo(25).on("child_added", function(snapshot)
{
console.log(snapshot.key);
});
My Data looks like:
dinosaur
- stega
height : 25
- bronto
height : 25
Can someone clarify why I'm only getting one record back if the docs say it should return all?
Aucun commentaire:
Enregistrer un commentaire