Using underscore and I have an object array like so -
myObj = [{"car" : "red" },{"tree" : "green"}];
and I am being passed a new object that I need to find and overwrite an object with the same key, so I would be sent like
{"car" : "blue" };
And I have to take the original object and change the car to blue. Is this possible with underscore? Thanks!
Edit - just to be clear, I am being given the {"car" : "blue"} and I need to compare it to the original object and find the "car" and replace it with the new value. Thanks!