I am working in angular js and my data is coming from api in json array.I need to add filter according to selected date range from calendar. My dates are coming in two fields "from" and "to" or it can be a single date and i need to show records according to expiry date in json.

if user select the date range and click on search then i need to get selected records .This is my js in controller file.

```
localStorageService.set('usersOpen', users.openUsers);
localStorageService.bind($scope, 'usersOpen');

users.myUsers = myUsers;
        function myUsers(start_date,end_date){
            DataService.myOpenUsers()
                .then(function successCallback(response) {
                $scope.usersOpen.length = 0;
                $scope.usersOpen.push({'data': response.data.results});
            }, function errorCallback(response) {

            });

```

This is json format that i need to filter. 

```
{
  "results": [{
    "id": "999896",
    "description": "Description Testingggg",
    "picturesUrl": [],
    "assigID": [{
      "userId": "67767776",
      "email": "test@gmail.com",
      "firstName": "test",
      "lastName": "User",
      "pictureUrl": "",
      "notifyStatus": "None",

    }],
    "expiryDate": "2016-10-14T17:48:50.100Z",
    "createdUserId": "8887900",
    "status": "Open",
    "dtModified": "2016-10-14T12:21:27.431Z"
  },{
    "id": "999897",
    "description": "New Tested Description",
    "picturesUrl": [],
    "assignedTo": [{
      "userId": "887997",
      "email": null,
      "firstName": "testing",
      "lastName": "users2",
      "pictureUrl": null,
      "notifyStatus": "None",
      "devices": []
    }, {
      "userId": "887997",
      "email": "testing@hotmail.com",
      "firstName": "Testing",
      "lastName": "User2",
      "pictureUrl": "",
      "notifyStatus": "None",

    }],
    "expiryDate": "2016-10-11T09:46:09.100Z",
    "createdUserId": "887997",
    "status": "Open",
    "location": {
      "lat": 12.1,
      "lon": -3.1
    },
    "dtModified": "2016-10-11T09:36:30.217Z"
  }]
}

```

This is html where i am getting records.

```
<ul>                        
<li ng-repeat="users in usersOpen[0].data track by $index" class="{{users.status}} {{yit.id}}">                         
<div class="content-box">
<div class="text-box">  
{{users.description}}   
</div>
{{users.expiryDate}}    
</div>
{{users.firstName}} 
 </li>  
</ul>   

```