Need some help to solve basic task.
I have two arrays of objects.
const firstArr = [
{id: 1, action: 'pending'},
{id: 2, action: 'pending'},
{id: 3, action: 'pending'},
];
const secondArr = [
{id: 1, action: 'accepted'},
{id: 2, action: 'accepted'},
{id: 3, action: 'accepted'},
{id: 566, action: 'accepted'},
{id: 333, action: 'accepted'},
{id: 234, action: 'accepted'},
];
I need to find in second array all objects with equal ids from first array and change "action" property in second array on "action" property from first array