I have a function that gets all the documents where an id matches like so:
const query = admin.firestore().collection('unassignedItems').doc('1uD82gAXORYsyimX5Dw23DDAimx1').collection('unassigned')
.where('meta.designId', "==", id);
const qs = await query.get();
const items = [];
qs.forEach(doc => {
items.push(doc.data());
});
return items;
The documents that are returned though all have a subCollection called images, that contains a document containing more information.
Is there a way I can return this information along with the parent document information at the same time from my function?