Hey folks, I'm wondering what's the most effective way to update an array of objects with values from another object. For example, imagine we have an array and an object structured like this:
let arr = [
{
parameter: 'aaa',
isSomething: false
},
{
parameter: 'bbb',
isSomething: false
},
{
parameter: 'ccc',
isSomething: false
}
];
let obj = {aaa: false, bbb: true, ccc: true}
The desired output would be:
let arr = [
{
parameter: 'aaa',
isSomething: false
},
{
parameter: 'bbb',
isSomething: true
},
{
parameter: 'ccc',
isSomething: true
}
];
I could use some assistance with this task. Any help would be greatly appreciated. Thank you!