Still don't understand what you are trying to achieve...
You want to modify the service:Database while keeping the order of the array the same (or something) ?
In your map example obj.active
does not exist. it should be obj.mactive
This works
a = [{"service": "Check server", "service_status" : false,"paralel":false, "time": null, "st_info":true, "st_debug":false, "mresult":null,"mactive":true},
{"service": "Database", "service_status" : false,"paralel":true, "time": null,"st_info":true, "st_debug":true,"mresult":null,"mactive":false},
{"service": "Notificatie", "service_status" : false,"paralel":true, "time": null,"st_info":true, "st_debug":true,"mresult":null,"mactive":true},
{"service": "OS command", "service_status" : false,"paralel":false, "time": null,"st_info":true, "st_debug":true,"mresult":null,"mactive":false}];
let s = "Database"
let r = null
a.map(obj => {
if(obj.service === s) { obj.mactive = true;r = obj}
return obj
})
node.warn('changed array: '+JSON.stringify(a))
if(r !== null)
{msg.payload = r;return msg;}