Retrieve data from Firebase use orderByChild. Follow this example code and apply it in your code.
Example code:
<script> var getUser = firebase.database().ref('notification/').orderByChild('user_id').equalTo('5'); getUser.on('value', function(snapshot) { var data=snapshot.val(); alert(data); }); </script>
Question and answer is powered by AnsPress.io