I have external JSON file call datas. This is the body of that JSON file.
[
    {"value": "1", "text": "aaa"},
    {"value": "2", "text": "bbb"},
    {"value": "3", "text": "ccc"},
    {"value": "4", "text": "ddd"},
    {"value": "5", "text": "eee"},
    {"value": "6", "text": "fff"},
    {"value": "7", "text": "ggg"},
    {"value": "8", "text": "hhh"},
    {"value": "9", "text": "iii"},
    {"value": "10", "text": "jjj"}
]
I want to filter data from this JSON file according to following array "b" values.(b0, b1, b3 etc)
$scope.array = {"badge":"1,2,5,7","id":"0","b0":"1","b1":"2","b2":"5","b3":"7"}
Example:
This array have b0, b1, b2 and b3 those values are 1, 2, 5 and 7. Therefor I want to get only 1, 2, 5, 7 values arrays from datas JSON file and display text values of this array.
This array can be change with same format. Therefor I want to consider b+"number" parameters.
Example 1:
$scope.array = {"badge":"1,2,3,9","id":"0","b0":"1","b1":"2","b2":"3","b3":"9"}
Example 2:
$scope.array = {"badge":"1,2,7","id":"0","b0":"1","b1":"2","b2":"7"}
Example 3:
$scope.array = {"badge":"1,2,5,7,8,9","id":"0","b0":"1","b1":"2","b2":"5","b3":"7","b4":"8","b5":"9"}
I get that JSON external file using angularjs like this,
$http.get("/json/datas.json").success(function(data) {
      $scope.datas= data;
});
Values are display using repeat.
<div ng-repeat="data in datas">
    <span ng-bind-html="data.text"></span>
</div>
Display HTML body only
aaa bbb eee ggg

