title: Javascript array equality control
body: <p>Hi I have two changeable length arrays and I tried If there is no value I want, delete it from that array</p>
  
  <pre><code>array1 = [
      {
        "serial": "3",
        "code": "1"
      },
      {
        "serial": "700",
        "code": "1"
      },
      {
        "serial": "300",
        "code": "1"
      },
      {
        "serial": "400",
        "code": "1"
      }
  ]
  
  array2 = [{
        "someting": 10,
        "someting2": "20",
        "serialList": ["700","711"],
      },
  
  {
        "someting": 10,
        "someting2": "30",
        "serialList": ["300"],
      },
  {
        "someting": 0,
        "someting2": "0",
        "serialList": [],
      }
  ]
  </code></pre>
  
  <p>this my two array as I said arrays length is changeable sometimes array1 length big, sometimes array2 and I want If serial number in array1 does not exist in array2 delete from array1 element, 
  according to above array1[0] and array1[3] serial codes does not exist any element of array2 I want to output array1 is:</p>
  
  <pre><code>array1 = [
      {
        "serial": "700",
        "code": "1"
      },
      {
        "serial": "300",
        "code": "1"
      }
  ]
  </code></pre>
  
  <p>How can I do that, thnx</p>