As a newcomer to AngularJS, I am trying to implement a filter in my ng-repeat
. Here is the structure of my JSON data:
var data = [
{name:test1,b1:{lastValue:0},b2:{lastValue:6},b3:{lastValue:6},b4:{lastValue:0}}
{name:test2,b1:{lastValue:6},b2:{lastValue:0},b3:{lastValue:6},b4:{lastValue:0}}
{name:test3,b1:{lastValue:6},b2:{lastValue:0},b3:{lastValue:6},b4:{lastValue:0}}
]
I have attempted to apply a filter based on the lastValue property, using the following code:
ng-repeat = "d in data | filter:{*.lastValue:filterStatus}"
filterStatus // contains the selected filter value, however, it doesn't seem to work
Despite looking for solutions online, I have been unable to find a working solution. Any help would be greatly appreciated.