Answers for "javascript replace objet in array"

-1

javascript find object in array and replace it

const updatedData = originalData.map(x => (x.id === id ? { ...x, updatedField: 1 } : x));
Posted by: Guest on December-11-2020

Code answers related to "javascript replace objet in array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language