lodash Mongoose object id difference
Instead of using _.difference
use _.differenceWith
with _.isEqual
argument like as follows
console.log(_.differenceWith(allStudentsArrray, presentStudentsArray,_.isEqual));
Hope this works!
Instead of using _.difference
use _.differenceWith
with _.isEqual
argument like as follows
console.log(_.differenceWith(allStudentsArrray, presentStudentsArray,_.isEqual));
Hope this works!