I have this json:
[
{
"month": "Feb",
"title": "Title 1",
"status": "Closed"
},
{
"month": "Feb",
"title": "Title 2",
"status": "Delayed"
},
{
"month": "Feb",
"title": "Title 3",
"status": "Open"
},
{
"month": "Mar",
"title": "Title 4",
"status": "Closed"
}
]
I'm trying to fill a select box with months:
<select id="month" ng-model="monthFilter" ng-options="task.month for task in tasks | filter: monthFilter">
<option value="">MONTH</option>
</select>
I don't know if I'm doing it in the right way but obviously it returns me a list of all arrays' months: Feb, Feb, Feb, Mar
. How can I make angular return me only Feb, Mar
?
Some help would be appreciated.