I have a json document like this

```
{
  "_id": "73a43a134b4169f04ddb734ef09785e9",
  "title": "US",
  "areas": 
[
{
      "text": "xyz"
}

{
      "text": "abc"
}
]

}

```

I need to search the document with areas = xyz

I have created design document like this, but not getting results. any idea ?

```
{
  "_id": "_design/areaapp",
  "filters": {
    "by_area": "function(doc, req) { for( var i=0, l=doc.areas.length; i<l; i++) { return doc.areas[i].text === req.query.area;  }}"
  }
}

```

here is my link
<https://hostname/databse/_changes?filter=areaapp/by_area&area=xyz>

Thanks