fetch('data/equipmentStateHistory.json')
.then(res => res.json())
.then(json => {
for (let i = 0; i < json.length; i++){
for(let j = 0; j < equipmentObj.length; j++){
if(json[i].equipmentId === equipmentObj[j].equipmentId){
**equipmentObj[j].states = json[i].states;**
/* console.log(json[i].states) */
/* Object.assign(equipmentObj, {key3: json[i].states}); */
}
}
}
})
Here is the console with the two keys recognized
under is states as the 3rd key, which i cannot reference to use in the code
console_img