I use this query to get a collection record, why is it not working?
{
"location.locationGroup.title": {
equals: searchParams.locationGroup,
}
}
If you console log searchParams.locationGroup, what do you get?
Can you share the config for this location field on the collection you are querying
I double check the searchParams.locationGroup, its showing the right value.
Project Collection:
Location Collection:
Location Group Collection:
I also have another query that looking for location.title, it works fine, I notice that only when I try to go 1 level deep, it doesn't work.
https://github.com/payloadcms/payload/discussions/761
I believe nested queries are not supported but this is on our roadmap to implement in the future
Star
Discord
online
Get dedicated engineering support directly from the Payload team.