# Filter JSON Using Checkboxes with AngularJS

**URL:** <https://forum.ionicframework.com/t/filter-json-using-checkboxes-with-angularjs/62815>\
**Category:** ionic-v1\
**Created:** [September 7, 2016, 6:34pm UTC](https://forum.ionicframework.com/t/filter-json-using-checkboxes-with-angularjs/62815 "2016-09-07T18:34:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amrayoub](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/amrayoub/32/101916_2.png) [@amrayoub](https://forum.ionicframework.com/u/amrayoub)\
**Post date:** [September 7, 2016, 6:34pm UTC](https://forum.ionicframework.com/t/filter-json-using-checkboxes-with-angularjs/62815/1 "2016-09-07T18:34:13Z")

</div>

Hello , I have been trying to solve this problem for days.  
i’m trying to filter json data using checkbox , for example when i check more than one id , it shows the rest it’s data

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/2/b/2bf2b3a527b47ea5b8bebd4d6f8a9c38d4362dad.png)  
.controller(‘compareModelsCtrl’,[’$scope’,’$http’, ‘$state’ ,’$location’,  
function($scope, $http, $state,$location, filterFilter) {  
$http.get(‘js/data.json’).success(function(data){  
$scope.models = data;  
$scope.whichmodel = $state.params.modelId;  
//$scope.toggleStar = function(model){  
// model.star = !model.star;  
//}

```
    });
  $scope.goL = function () {
  
         $state.go('tabsController.compareModels2');
  
};

    $scope.order = {
        
    }; 

  $scope.format=function(){
  $scope.modifiedOrder=[];
   angular.forEach($scope.order, function(value, key) {
    if(value){
      $scope.modifiedOrder.push(parseInt(key));
    }
});
}

   <ion-checkbox ng-repeat="model in models | filter:query" ng-model="order[model.id]" ng-change="format()">{{model.model_number}}</ion-checkbox>
          </ion-item>
          current order : {{modifiedOrder}} 

```

i found this code and i have trying to implement it [http://blog.sodhanalibrary.com/2015/12/filter-json-data-with-check-boxes-using.html#.V9BCarl97VN](http://blog.sodhanalibrary.com/2015/12/filter-json-data-with-check-boxes-using.html#.V9BCarl97VN)

,any help , please
