Save Firebase data in array

0

Good, I would like to be able to save the data obtained from firebase in an array, since the function I found in the google docs uses a foreach and I have not managed to save the datas in a single array and then use it

db.collection("users").get().then((querySnapshot) => {
querySnapshot.forEach((doc) => {
    console.log('${doc.id} => ${doc.data()}');
});

I would like to have an array to which you can access all the data or to each one using the key [x]

    
asked by Santiago D'Antuoni 23.01.2018 в 18:39
source

0 answers