I'm writing a cloud function which updates a sibling collection onUpdate. I have the follwong:
await db.collection(
`users/${userId}/rosters`).where(
"athletes.keys", "array-contains", bid).get();
where "athletes" is a map attribute in each document in rosters. Does this logic not work? Is there some other way to do it? Thanks!!