Can I search by data content?

Hello,

If I have a document like this:

{
  "results": [
    {
      "data": {
        "settings": [
          {
            "color": "red"
          }
        ]
      }
  ]
}

How I can retrieve all the documents that have results.data.settings.color equal to "red" ?

Hi @mohamed

Welcome to the Prismic community and thanks for reaching out to us.

It's not possible to retrieve documents the way you are doing. You can retrieve documents that have a specific by using predicates with Custom Types and fields If the document has a field name as "color," which is uniquely present in documents.

Find more details about predicates here:

Let me know if you have any further questions.

Thanks,
Priyanka