I wonder if there is a simpler method in lodash to replace an item in a JavaScript collection? (Possible duplicate but I did not understand the answer there:)
I look
var arr= [{id: 1, name: "Person 1"}, {id:2, name:"Person 2"}]; var index = _.findIndex(arr, {id: 1}); arr[index] = {id: 100, name: 'xyz'}