1let arr = [
2 {
3 "enabled": true,
4 "deviceID": "eI2K-6iUvVw:APA",
5 },
6 {
7 "enabled": true,
8 "deviceID": "e_Fhn7sWzXE:APA",
9 },
10 {
11 "enabled": true,
12 "deviceID": "e65K-6RRvVw:APA",
13 },
14];
15
16const id = 'eI2K-6iUvVw:APA';
17
18arr.find(v => v.deviceID === id).enabled = false;
19
20console.log(arr);
1 const updatedData = originalData.map(x => (x.id === id ? { ...x, updatedField: 1 } : x));
2