const changes = _.omitBy( _.fromPairs(_.differenceWith(_.toPairs(obj1), _.toPairs(obj2), _.isEqual)), _.isNil, ); if (!_.isEmpty(changes)) { .... }