Filter records by child array using URL

System Information
  • Strapi Version: v3.6.6

we have parent child relation in strapi. we want to filter parent records which does not have any children or empty array e.g.

        "id": 1,
        "title": "title1",
        "children": [
                "id": 1,
                "name": "child1"
        "id": 2,
        "title": "title2",
        "children": []

we want to fetch record where “children”: [].

We tried


but all these URLs are returning blank array [].

I want where children name is child1

It’s because by default strapi don’t send back any relation field
I think you should you use populate:

this is how it works (in the controller or service)

And if you want you can the populate inside the query params: