title: Javascript - How do I compare two objects' data properties?
body: <p>I'm simply trying to compare the notifications list received from the server to the one I've stored on the local side.</p>
  <pre><code>if(myApp.NewNotifications != response.data['unread_notifications']){
    return true;
  } else { return false; }
  </code></pre>
  <p>The problem is that even when they both have the same data, it returns false.</p>
  <p>Since I'm using <strong>Vue.js</strong> on the client side, I assume it attaches some properties to the local object which makes it different to the one received from the backend.</p>
  <p>Here is an output example:
  <a href="https://i.stack.imgur.com/v04GL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v04GL.png" alt="console log" /></a></p>
  <p>I checked the Lodash documentation but I don't think there are comparison function for such case.</p>