I have two objects and I want to process them without use of for Loop and get the result.
key is taken from obj1 "keyname"
const obj1 = [{
_id: 5 f467650890a7444d8d9ea5b,
keyname: 'fTime',
PTag: '(FaultHrs*360)+(FaultMins*60)+FaultSecs',
__v: 0
},
{
_id: 5 f467650890a7444d8d9ea5b,
keyname: 'rTime',
PTag: '(RunHrs*360)+(RunMins*60)+RunSecs',
__v: 0
}
]
const obj2 = {
FaultHrs: 2,
FaultMins: 0,
FaultSecs: 49,
RunHrs: 1,
RunMins: 0,
RunSecs: 0,
}
Result: {
fTime: 769,
rTime: 360
}