Reputation: 19
I want to print something on the excel file and that excel file works on the format of array of arrays so I need to convert an array into an array of arrays like this:
['x','y','z'] to [['x'],['y'],['z']]
I have tried to use store this using the firestore and push it on the array
const query = async() => {
const querySnapshot = await db.collection('collectionName').get();
const data = []
querysnapshot.forEach(doc => {
const x = getIdentifier(doc)
data.push(x)
})
console.log(data) //it gives an array like this ['x','y','z']
}
query();
Upvotes: 0
Views: 104