xxipvg
Last Updated: February 25, 2016
·
480
· riyadhalnur
10309058 10152457564452360 4465802230248535815 n

Compare object equality the easy way in JS

If you have ever been in a situation where you have to compare a JavaScript object with another down to every single property for equality (or a deep comparison), lodash has an awesome function that will do just that and return either a true or false.

var ob1 = {};
var ob2 = {};

var obequality = _.isEqual(ob1, ob2);
Say Thanks
Respond