When it comes to editing properties in an array using the find method, I've been able to do so for a single property like shown in this example. However, I'm struggling to find a syntax that allows me to edit more than one property at a time.
const arr = [
{
id: 101,
name: “Jone”,
age: 1
},
{
id: 102,
name: “Jane”,
age: 2
},
{
id: 103,
name: “johnny”,
age: 3
}
];
console.log(arr);
arr.find(element => element.id == 101).name = “jimmy”
console.log(arr);