i would to automate backup process of a firestore database. The idea is to loop over root document to build a JSON tree. but i didn\'t find a way to get all collections ava
firebase.initializeApp(config); const db = firebase.firestore(); db.settings({timestampsInSnapshots: true}); const collection = db.collection('user_dat'); collection.get().then(snapshot => { snapshot.forEach(doc => { console.log( doc.data().name ); console.log( doc.data().mail ); }); });