[Vuejs]-How To Convert Firebase object into an Array

1👍

The following should do the trick:

const querySnapshot = await this.$fire.firestore.collection('Post').get()
const arrayOfDocs = querySnapshot.docs.map((doc) => doc.data());

The docs property of a QuerySnapshot returns an array of all the documents in the QuerySnapshot.

Leave a comment