Update array of objects depend on values from another array [duplicate]

The array of Objects and different arrays with values. Need to know how to update the data object depended on that value. Value in array matches id in data. Thx much for help

{
   "data":[
      {
         "id":1,
         "name":"name1",
         "active":false
      },
      {
         "id":2,
         "name":"name2",
         "active":false
      },
      {
         "id":3,
         "name":"name3",
         "active":false
      }
   ]
}

Array of values

values = [1,3]

How should look

{
   "data":[
      {
         "id":1,
         "name":"name1",
         "active":true
      },
      {
         "id":2,
         "name":"name2",
         "active":false
      },
      {
         "id":3,
         "name":"name3",
         "active":true
      }
   ]
}