title: Filter array of objects by array of ids
body: <p>I have an array <code>activeIds</code> of ids of services and there is another array <code>servicesList</code> which contains objects of services.</p>
  
  <p>Example: -</p>
  
  <pre><code>activeIds = [202, 204]
  serviceList = [{  
                  "id":201,
                  "title":"a"
                 },
                 {  
                  "id":202,
                  "title":"a"
                 },
                 {  
                  "id":203,
                  "title":"c"
                 },
                 {  
                  "id":204,
                  "title":"d"
                 },
                 {  
                  "id":205,
                  "title":"e"
                 }];
  </code></pre>
  
  <p>I want all the services(obj) whose ids are not a part of the first array i.e., <code>activeIds</code>. From the above example code <strong>I want service obj of ids 201,203,205</strong></p>
  
  <p>Final output - </p>
  
  <pre><code>expectedArray = [{  
                  "id":201,
                  "title":"a"
                 },
                 {  
                  "id":203,
                  "title":"c"
                 },
                 {  
                  "id":205,
                  "title":"e"
                 }];
  </code></pre>
  
  <p>Here is my attempt to code. But it is not correct at all. Please help-</p>
  
  <pre><code>    const activeIds = e; // [202, 204]
      const obj = [];
      this.serviceList.map((s: IService) =&gt; {
          activeIds.map((id: number) =&gt; {
              if (id !== s.id) {
                  obj.push(s);
              }
          });
      });
  </code></pre>