SvZ ( > ^ ^)>S
Convex Community16mo ago
4 replies
SvZ ( > ^ ^)>

How to query an array in filter or withIndex

I want to query an array of users by either filter or withindex, any assistance will be great.

Example of schema -
chat: defineTable({
isGroupChat: v.boolean(),
participants: v.array(v.id("users")),
chatContext: v.optional(v.string()),
})
.index("participants", ["participants"])

Want to filter out by the userID inside of the participants... please don't say I need to fetch the entire chat and then filter it out.
Was this page helpful?