object compare lodash code example
Example 1: lodash deep clone object
const clone = require('lodash/clone');
const cloneDeep = require('lodash/clonedeep');
const shallowCopy = clone(originalObject);
const deepCopy = clonedeep(originalObject);
Example 2: diff two arrays lodash
_.difference([2, 1], [2, 3]);
// => [1]