When I get several documents from a collection, the result is only an array with each doc data.
firestore.collection("categories").valueChanges().subscribe(data => {
console.log(data);
// result will be: [{…}, {…}, {…}]
};
How can I get the name of each doc?
The ideal result would look like this:
{"docname1": {…}, "docname2": {…}, "docname3": {…}}
snapshotChanges()
– Makah