Sorry to ask but my head is in pieces. I have two very similar object arrays (I'd simplified my problem / example here rather than use the actual data I am working with to reduce the code) I wish my first array to loop through the second item, determine if the ID of the current objects matches an ID of an item in the second array and if there is a match the price property of the array item from the first array is updated to the value of the price of the matching object in the second array. So for example the firstArray object with the id value of 1 would have its price updated to 25 as that is the price in the object with a matching ID in the second object... phew!

```
var firstArray = [
    {id:"1", name: "Shirt", price: "15.00"},
    {id:"2", name: "Pants", price: "30.00"},
    {id:"3", name: "Socks", price: "8.00"},
    {id:"4", name: "Gloves", price: "5.00"},
    {id:"5", name: "Shirt", price: "16.00" }
];

var secondArray = [
    {id:"1", name: "Shirt", price: "25.00"},
    {id:"2", name: "Pants", price: "40.00"},
    {id:"3", name: "Socks", price: "12.00"},
    {id:"4", name: "Gloves", price: "6.00"},
    {id:"5", name: "Shirt", price: "21.00"},
    {id:"6", name: "Hat", price: "30.00" }
];

```

I don't want to use loops and I'd rather use functional programming using .filter or .map... I just can't think how to do this. Any advice would be appreciated.

I am confused if I should `.filter` or `.map`? Looping through the first array seems easy, it is checking against the second array that is making my head itch.

I'm currently trying this myself but people here are usually faster and smarter than myself and suggest more eloquent solutions.