title: how to check the array of values to perform the condition
body: <p>I have two tables users and providers.</p>
  <p>1.Users id's and providers vendorId should be equal.</p>
  <p>2.if no record is found for the users id . Insert a new record for the users in providers table.
  I went through some websites I unable to find the solution without using the loop.
  Is possible to do without loop.</p>
  <pre><code>const users = [
    {
      id: 1,
      name: &quot;steve&quot;,
      age: 20,
    },
    {
      id: 2,
      name: &quot;Albert&quot;,
      age: 21,
    },
    {
      id: 3,
      name: &quot;Antony&quot;,
      age: 20,
    },
    {
      id: 4,
      name: &quot;Williams&quot;,
      age: 22,
    },
  ];
  </code></pre>
  <pre><code>const provider = [
    {
      vendorId: 1,
      status: &quot;act&quot;,
      description: &quot;&quot;,
    },
    {
      vendorId: 3,
      status: &quot;inactive&quot;,
      description: &quot;&quot;,
    },
    {
      vendorId: 5,
      status: &quot;act&quot;,
      description: &quot;&quot;,
    },
  ];
  </code></pre>
  <p>Thanks.</p>