Hi everyone,
I successfully been able to get data from a collection group. Now, I would like to do some data manipulation using JS Code. I would like to get the parent
document of an object (see here)
Unfortunately, I'm not able to access obj.ref.parent since ref (see documentation) doesn't exist
Is there a way to achieve this? Any ideas?
Here's a snap of what I'm doing:
const resultsFromCollectionGroup = await getMyCollectionGroup.trigger()
const uids = resultsFromCollectionGroup.map(obj => obj.ref.parent.parent.id);
console.log(uids); //this should list all parent document IDs