Ony one subcollection get export from backup method
burhankhanzada opened this issue · comments
Burhan Khanzada commented
i think the problem is with this line because this overwrite the extisting data so the last sub collection is only printed
data[collectionName][doc.id]['subCollection'] = subColData;
or is there is something wrong with my code
firestoreService
.backup('collection-name')
.then((data) => {
let json = JSON.stringify(data, null, 2);
console.log(json)
fs.writeFileSync('backup.json', json);
});
Bruno Machado commented
I created a pull request fixing this.
Dale Nguyen commented
Should be fixed in v0.6.1