I have a document in a collection which has an array of objects as a property.
e.g.
Projects
name: 'Great Project'
members: [{id:'1', name:'rob']
I want to get all projects with rob as a member.
I was hoping this would work
collection("projects")
.where("members.name", "array-contains", "rob")
...but nope.
As you can see, I'm trying to get the ID
I suppose I could use a sub collection, but then I'd have a similar issue.
What am I doing wrong!
And, is this the best way to store this data?