title: TypeScript. FormGroup FormArray - remove only one element object by value. Angular 2 4
body: <pre><code>this.formGroup = this.formBuilder.group({
      images: this.fb.array([])
  });
  </code></pre>
  
  <p>I add new element in this way:
  <code>this.images.push(new FormControl(new ImageCreateForm(this.imageResponse.id)));</code></p>
  
  <pre><code>get images(): FormArray {
      return &lt;FormArray&gt;this.formGroup.controls.images;
  }
  </code></pre>
  
  <p>My classes:</p>
  
  <pre><code>export class ImageCreateForm {
      id: number;
      constructor(id: number) {
          this.id = id;
      }
  }
  
  export class ImageResponse {
      id: number;
      url: string;
  }
  </code></pre>
  
  <p>When I added images, then my <code>{{ formGroup.value | json }}</code> is:</p>
  
  <pre><code>"images": [
     {
      "id": 501
     },
     {
      "id": 502
     },
     {
      "id": 503
     }
  ]
  </code></pre>
  
  <p>I want to remove images (for example only image with <code>id=502</code>) from <code>formGroup</code> before when I send my form POST request. Is it possible?
  I tried use <code>reset</code> method, but this remove all elements:
  <code>this.images.reset({"id":image.id});</code>. Where <code>image</code> it is a <code>ImageResponse</code> object.</p>
  
  <p>Result: <code>{"images": [ null, null, null ]}</code>, but I want:</p>
  
  <pre><code>"images": [
     {
      "id": 501
     },
     {
      "id": 503
     }
  ]
  </code></pre>