0

Here is my database Image.

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

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much sir, it worked. I was using small data. :)
1

Change this:

ref("data/aqibkhan109")

into this:

ref("Data/aqibkhan109")

data should use capital letter same as in the database.

1 Comment

Thank you so much sir, it worked. I was using small data. :)
0
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.