title: How to compare by two objects typescript angular6
body: <p>I want to compare two Json object arrays. One has more data. For the final result if one id finds another the selected checkbox = true. So far there are 4 and it only finds one. Do I loop through the long array first and then loop through the second array to find a match?</p>
  
  <pre><code> this.formAll = JSON.parse(response)
        for (var i = 0; i &lt; this.formAll.length; i++) {
          for (var j = i; j &lt;  this.formAb.length; j++) {
           console.log( this.formAb[j].id,  this.formAll[i].SeriesNumber);
            if ( this.formAll[i].id === this.formAb[j].id) {
              console.log( 'small=', this.formAb[j].id, 'large=', 
           this.formAll[i].id );
           this.formAll[i].selected = true;
          }}
        }
  </code></pre>