replace object in array with another array with same id javascript

Solutions on MaxInterview for replace object in array with another array with same id javascript by the best coders in the world