Currently, I am working with an array that looks like this:
arr = [{id:'first',name:'John'},{id:'fifth',name:'Kat'},{id:'eitghth',name:'Isa'}]
. However, I need to add a condition to the array. If the id 'fifth' is found in the array, then I want to update it to look like this:
arr = [{id:'first',name:'John'},{id:'sixth',name:'Kat'},{id:'eitghth',name:'Isa'}]
I only need to modify one part of an item. How can I achieve this using JavaScript?