JSON.stringify(obj1) === JSON.stringify(obj2)
//No generic function to do that at all.
//use Lodash, famous for such must have functions, all efficiently built
//http://lodash.com/docs#isEqual ---
npm install lodash
_.isEqual(object, other);
const isEqual = (...objects) =>
objects.every((obj) => JSON.stringify(obj) === JSON.stringify(objects[0]));
if (!isEqual(this.lastValue, val)) {