Answers for "update object within object by id js"

0

update object within object by id js

//This will replace myId of the item id with the updated object

return myArray.map((item) => {
	return item.id === myId
		? UPDATED_OBJECT_HERE
		: item;
});
Posted by: Guest on January-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language