I've got a front-end app in which the user can add/remove fields from their profile. I'm trying to create a PUT request to the API and usually I'd just _.merge(original, req.body) but the updated object has several properties removed from the object which is not on the original object.
Is there any way to merge the objects and have the fields which have been removed on the new object, also removed from the original one - while maintaining the original object and merging values which are present on both objects (it's a mongoose model with id properties and such that I need to keep)
Thank you!