Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

how to query document by related docs name/id

default discord avatar
djkato2 years ago

Hello, I have a Media collection with a relation field to many Tag collections. How can I REST query to get all media that have a certain tag assigned to them?


http://localhost:8000/api/media?where[tag][name][equals]=3D

I'd assume something similar to this maybe? But this one doesn't work. Thanks



http://localhost:8000/api/media?where[tags.name][equals]=3D

this works It seems!

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.