I am using firebase realtime database but i cannot access the date,description and other fields when i use this code below:
let dataRef = firebase.database().ref().child('cars');
dataRef.on('value', function(data) {
console.log(data.val());
});
It returns all the childs in the cars node as a single object
Output: Object { "-LGixH1Hbjb01pVGa9AM": {…}, "-LGixXbCcbv082aohG3E": {…}, "-LGixnOd80UjF6PlSNhL": {…} }
Is there a way to access name value pairs inside the Keys(that are -LGixH1Hbjb01pVGa9AM,-LGixXbCcbv082aohG3E,-LGixnOd80UjF6PlSNhL)
Thanks in advance.