Reputation: 396
I want to display all the values in the vertex. How can I do this? Currently the following code give me null value.
var dbRef = firebase.database().ref("data/aqibkhan109").child('corn').child('polygon19').child('vertex');
dbRef.on('value', function(snapshot){
console.log(snapshot.val());
});
Any help Please, It's a realtime database
Upvotes: 0
Views: 451
Reputation: 1
var dbRef = firebase.database().ref().child("Data/aqibkhan109/corn/polygon19/vertex");
dbRef.on('value',snapshot=>{
console.log(snapshot.val());
});
Try this. I hope it will work for you.
Upvotes: 0
Reputation: 80914
Change this:
ref("data/aqibkhan109")
into this:
ref("Data/aqibkhan109")
data
should use capital letter same as in the database.
Upvotes: 1
Reputation: 317372
The first node of your database is "Data" with a capital D, but your code is using "data" with a lowercase d. The database is always case sensitive, and queries need to match exactly.
Upvotes: 1