Naimish Makwana

Naimish Makwana

  • 978
  • 1.6k
  • 7.1k

How to filter array of objects by key in controller Angular JS.

Jan 24 2023 5:34 AM

I have the below array object:

[
  {
    "emp_id": "1",
    "cmp_id": 1,
    "name": "test1"
  },
  {
    "emp_id": "2",
    "cmp_id": 1,
    "name": "test2"
  },
  {
    "emp_id": "2",
    "cmp_id": 1,
    "name": "test12"
  }
]

I want to filter data by cmp_id.


Answers (3)