I am working on a project which allows users to filter jobs based on criteria such as city, job level and job category. As the user clicks on a filter the search results will be filtered, but so too will the filters themselves.
To do this I plan to get my list of filter cities, levels and categories from the filtered job objects. My question is how, in Angular, can I create 3 object arrays using data from a 4th object array?
My Jobs array ($scope.programs) has the following format:
[
{
title: "HR Analyst",
city: "Jacksonville",
state: "Florida",
country: "United States",
region: "North America",
level: "Full Time Analyst",
category: " Human Resources"
}
]
and I then plan to create 3 object arrays which store the name of the filter and its availability. So $scope.cities might look like this:
[
{
name: "London",
available: "true",
},
{
name: "Sydney",
available: "false",
},
]