title: How to get items from array that equal to the values in array
body: <p>I have this array:</p>
  <pre><code>dataArr: DataCode = [dataObj1, dataObj2, dataObj3, dataObj4, ... ]
  </code></pre>
  <p>And array of id:</p>
  <pre><code>idArray:string=[&quot;3&quot;,&quot;5&quot;,&quot;2&quot;,&quot;8&quot;,&quot;4&quot;];
  </code></pre>
  <p>Here is the defenition of DataCode:</p>
  <pre><code> export interface DataCode {
    userId: string;
    codeName: string;
    id: string
  }
  </code></pre>
  <p>How can I get from array dataArr all objects that has id value as in idArray.</p>