Hey there, I have a simple question about working with JSON files. Currently, I am retrieving a list of workers from a JSON file called workers.json.
[{
“workarea”: [“office”, “transport”, “IT”],
“picture”: “some url”,
“name”: “Mark Janken”,
“age”: 30,
“location”: “Holland”
}]
In my Angular controller, I am successfully fetching this data like so:
myApp.controller('MainController', function($scope, $http) {
$http.get('workers.json')
.success(function(data){
$scope.workers = data;
});
});
Now, I'm wondering how I can implement client-side filtering, for example using a URL parameter like /get-workers?location=:location and potentially having multiple filters.
I'm not sure where to start with this, any help or recommended resources would be greatly appreciated. Thanks!