firebase.database().ref("mydb").on('child_changed', function(childSnapshot) { console.log(childSnapshot.key,childSnapshot.val()); })