Removes properties from all targets if they are the same as in source. It mutates the targets!
Values are JSON-serialized before comparison, therefore, it will consider arrays and objects with the same content
as equal.
The property must be exactly the same in all targets. If even one target has different value for given property - the
property will stay untouched on all targets.
If you want to remove properties from each target that has given property the same as source - just run this
function in a loop, giving one target at a time.
Note: This function is intended to be used on small data sets that are JSON serializable. It will crash on circular
references and may produce unexpected results on non-serializable data (like functions).
Removes properties from all targets if they are the same as in source. It mutates the targets! Values are JSON-serialized before comparison, therefore, it will consider arrays and objects with the same content as equal.
The property must be exactly the same in all targets. If even one target has different value for given property - the property will stay untouched on all targets.
If you want to remove properties from each target that has given property the same as source - just run this function in a loop, giving one target at a time.
Note: This function is intended to be used on small data sets that are JSON serializable. It will crash on circular references and may produce unexpected results on non-serializable data (like functions).
Example
Example