title: How to check equality of two objects(only specific key values)
body: <p>How to check equality of two objects(only specific key values) which is one object type is number other one comes as a string type, but they are numbers.
  I want to check equality of x1, x2, x3 and x4 value of the two objects not all of the object values</p>
  <pre><code>var object1 = {
          id: 1234
          x1: &quot;1.000000&quot;,
          x2: undefined,
          x3: &quot;1.0&quot;,
          x4: &quot;1.0&quot;,
          x5: somevale 1
  };
  var object2 = {
          id: 3456
          x1: 1,
          x2: undefined,
          x3: 1,
          x4: 1,
          x5: somevalue 2
  };
  </code></pre>
  <p>I received the answer from <a href="https://stackoverflow.com/questions/68334868/how-to-check-equality-of-two-objects-one-objects-attributes-type-is-number-ot">How to check equality of two objects, one object&#39;s attribute&#39;s type is number other ones type is string but they are numbers</a>
  This solution checks every attributes of the object which I get false for my two objects, because other attributes can not be same.</p>