# Category: angularjs-filter

## How to filter an nested object array by value in angular expression?

I’m using an ng-repeat where each object (item) is as below: { “properties”: [ {“value”:”started”,”key”:”status”}, {“value”:”somename”,”key”:”name”}, {“value”:”10″,”key”:”age”}, ] } How do I get the value corresponding to key ‘status’ I have tried: <span class=”badge”>{{item.properties[‘value’] | filter:{item:{properties:{key:’status’}}}}}</span> but no luck. Thanks, Rohith Source: AngularJS

## Angular JS Controller with Filter For JSON Array Of Objects

I have below kind of JSON and I wanted to find the number of objects with Status : 1 in JSON and I have tried with below approach and its not working . And I know ng-filter needs to applied only to Array but I am not finding a way to do it in the below JSON data, Can someone help me I am getting error as expected but how to resolve this issue in […]

## AngularJS filter field according to values of an array

I have an Array and this array contains some Id’s. I would like to filter my result according to Id’s. For Example please see the below code snippet. How can I show the records which ‘StatusId’ located in the ‘ids’ array? According to my example, I want to list only: AAA BBB CCC <html> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js”></script> <script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js”></script> <script> angular.module(‘myApp’, []).controller(‘ctrl’, function ($scope) {$scope.ids = [{ “id”: 1 }, { “id”: 2 }, { […]