As the title says, is it possible to search a JSON field through the REST Api?
For example I have a JSON field
specifications
with a content like this
{"category": "birds", "subcategory": "flying birds"}
Can I specifiy I only want collections where the
specifications.category
equals "birds"?
The real JSON content will be like the specifications in this gist:
https://gist.github.com/kobeaerts/3105beaa41200a7415a9796d4eab9599Yes, you can use dot notation. It would be something like this:
/api/collection-name?where[specifications.category][equals]=flying birds
Aha, @denolfe that does indeed work but only with string values.
It does perform queries on
name="400"
but not on
name=400
I'm actually not seeing this work reliably, I'm wondering if changes in 2.0+ may have broken this?
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.