I just got into Firebase and I´m trying to retrieve data from the realtime database, but I can't get anything to show up on the webpage.
This is what I got, before the JS I got the initialize Firebase code. (IF I delete the val() I receive [object Object] so something is at least working).
JS:
var heading = document.getElementById("head");
var firebaseHeadingRef = firebase.database().ref().child("Heading");
firebaseHeadingRef.on('value', function(datasnapshot) {
heading.innerText = datasnapshot.val();
});
HTML:
<div id="table_body"> <h1 id="head">Some Text</h1>
This is a screenshot from the database:

I appreciate all help :)