How to query an array of objects?

I’m trying to figure out how to query an array of objects and I can’t find a way! Here’s what I’m trying:

const usersQuery = new Parse.Query(Parse.User)

usersQuery.equalTo("clubs", { id: clubId }) // clubs example [{ id: "123rty", name: "music", ...}, { ... }, ...]
usersQuery.equalTo("locale", locale)
usersQuery.select("gender", "avatar", "nickname", "type", "clubs")

usersQuery.find(.......

Any ideas?

Try usersQuery.equalTo("clubs.id", clubId)

1 Like