shurikkan,
info = [
{ id: 26, name: "CWVA", group: "EA211" },
{ id: 90, name: "CWVB", group: "EA211" }
]
sensors = [
{ id: 1, object_id: 19, name: "tempOil", value: 115 },
{ id: 3, object_id: 90, name: "tempOut", value: 9 },
{ id: 2, object_id: 26, name: "tempOil", value: 90 },
]
props = [
{ id: 1, object_id: 26, status: "off", RpM: 0 },
{ id: 2, object_id: 90, status: "on", RpM: 1208 }
]
i = info.reduce((obj, {id, name, group}) => (obj[id] = {id, name, group}, obj), {})
s = sensors.reduce((obj, {object_id, name, value}) => (obj[object_id] = {name, value}, obj), {})
p = props.reduce((obj, {object_id, status, RpM}) => (obj[object_id] = {status, RpM}, obj), {})
const create = id => {
const obj = i[id], sensors = s[id], props = p[id];
return {...obj, sensors, props}
}
console.log(create(26));
console.log(create(90))