title: How to filter array of objects based on another object in Javascript
body: <p>Can anyone help me know how to filter an array of objects based on another object with conditions.</p>
  <p>Sample array</p>
  <pre><code>const arrayToFilter=  [   {
          name: 'Arlin Schistl',
          screen_name: 'aschistl1c',
          followers_count: 101,
          following_count: 657,
          location: 'Indonesia',
          verified: true,  
          },  
          {
          name: 'Henka Perren',
          screen_name: 'hperren1d',
          followers_count: 170,
          following_count: 422,
          location: 'Mexico',
          verified: true,   }, ]
  </code></pre>
  <p>Filter Object:</p>
  <pre><code>const conditions=[ 
      { 
          id: 'name', 
          operator: 'CONTAINS' 
          value: 'Bob', 
      },
      { 
          condition:'OR',
          id: 'followers_count', 
          operator: 'GTE' 
          value: 200, 
      }, 
      {
          condition:'AND',
          id: 'following_count', 
          operator: 'LTE' 
          value: 10,
      },
      {
          condition:'AND',
          id: 'followers_count', 
          operator: 'GTE' 
          value: 150,
      } 
    ]
  </code></pre>
  <p>The array should return the object if it matches conditions in bitwise operator's execution order. Please let me know what will be the optimized code for this. Thanks in advance!</p>