I've got an array of JSON data structured like this:
[
{
id: 1,
name: 'Alice'
},
{
id: 2,
name: 'Bob'
},
{
id: 3,
name: 'Eve'
}
]
My goal is to locate an object by its id
and append a deleted: true
property to it.
I'm curious about the most straightforward method to achieve this.