Compare two array and change styles of ng-repeat items in angular
<p>I have a json like this -</p>

<pre><code>[{
    "id": "152",
    "name": "Accounting",
    "parent_id": "0",
    "created_at": "2016-12-20 18:10:57",
    "updated_at": "2016-12-20 18:10:57"
}, {
    "id": "292",
    "name": "Administration",
    "parent_id": "0",
    "created_at": "2016-12-20 18:37:29",
    "updated_at": "2016-12-20 18:37:29"
}, {
    "id": "422",
    "name": "Banquet",
    "parent_id": "0",
    "created_at": "2016-12-20 18:43:26",
    "updated_at": "2016-12-20 18:43:26"
}, {
    "id": "502",
    "name": "Engineering &amp; Maintenance",
    "parent_id": "0",
    "created_at": "2016-12-20 18:47:12",
    "updated_at": "2016-12-20 18:47:12"
}, {
    "id": "622",
    "name": "Food &amp; Beverage Admin",
    "parent_id": "0",
    "created_at": "2016-12-20 18:51:00",
    "updated_at": "2016-12-20 18:51:00"
}, {
    "id": "782",
    "name": "Food &amp; Beverage Service",
    "parent_id": "0",
    "created_at": "2016-12-20 18:56:38",
    "updated_at": "2016-12-20 18:56:38"
}, {
    "id": "982",
    "name": "Front Office",
    "parent_id": "0",
    "created_at": "2016-12-20 19:05:04",
    "updated_at": "2016-12-20 19:05:04"
}, {
    "id": "1212",
    "name": "Housekeeping &amp; Laundry",
    "parent_id": "0",
    "created_at": "2016-12-20 19:15:48",
    "updated_at": "2016-12-20 19:15:48"
}, {
    "id": "1352",
    "name": "HR",
    "parent_id": "0",
    "created_at": "2016-12-21 10:12:38",
    "updated_at": "2016-12-21 10:12:38"
}, {
    "id": "1462",
    "name": "IT",
    "parent_id": "0",
    "created_at": "2016-12-21 10:16:14",
    "updated_at": "2016-12-21 10:16:14"
}, {
    "id": "1492",
    "name": "Kitchen / Food Preparation",
    "parent_id": "0",
    "created_at": "2016-12-21 10:17:29",
    "updated_at": "2016-12-21 10:17:29"
}, {
    "id": "1712",
    "name": "Purchase",
    "parent_id": "0",
    "created_at": "2016-12-21 10:26:09",
    "updated_at": "2016-12-21 10:26:09"
}]
</code></pre>

<p>Which I am iterating in list with ng-repeat. </p>

<p>Now I have another array like </p>

<pre><code>[152,292,422,1712].
</code></pre>

<p>Now how do I match the second array with the id of first array and change the style of those matching id's object in the view.</p>

<p>Please suggest.</p>