My database structure looks like this:
I have to take all dNames and print it.
const db = firebase.firestore();
db.collection('map-data').doc('driver').get().then((snapshot) => {
snapshot.docs.forEach(doc=> { console.log(doc.data()['dName']) })
});