title: Cannot read property 'data' of undefined-using patchValue in sub formArray
body: <p>I tried to render the cat_name dynamically by selecting the select box. but i am not able the render the cat_name by using the patchValue. Below is my code to render the sub formArray. </p>
  
  <p>By selecting the select box using change event i got the firstname based on value i have filter the json array and i got particular formarray.</p>
  
  <p>It having the data formArray i tried to render the cat_name while selecting the select box but i am not getting. Below is my code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>selectarch(cat){
  
  this.test=this.users.filter(data =&gt;data.firstname === cat.target.value);
  
  let arr = &lt;FormArray&gt;this.myForm.controls.users;
  
  arr.controls[0].patchValue({firstname:this.test[0].firstname,lastname:this.test[0].lastname,street:this.test[0].street});
  
  let arr2 = &lt;FormArray&gt;this.myForm.controls.users[0].data;
  arr2.controls[0].patchValue({cat_name:this.test[0].data[0].cat_name});
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select (change)="selectarch($event)"&gt;
  &lt;option&gt;Select&lt;/option&gt;
  &lt;option [value]="res.firstname" *ngFor="let res of users"&gt;{{res.firstname}}&lt;/option&gt;
  &lt;/select&gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p>Below is my CODE URL
  <a href="https://stackblitz.com/edit/angular-formgroup-selectbox-textarea-working-modify-render" rel="nofollow noreferrer">CODE URL</a></p>
  
  <p>Below is json users array.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>users = [ { "firstname": "ramu", "lastname": "mothukuri", "city": "chennai", "street": "ramu sivan koiil street", "pin": "600024",
    "data":[{"cat_id":"1","cat_name":"yyy","category":"rrr"},{"cat_id":"2","cat_name":"zzz","category":"222"}] },
    { "firstname": "ravi", "lastname": "mothukuri", "city": "chennai", "street": "ravi sivan koiil street", "pin": "600024","data":[{"cat_id":"1","cat_name":"ddd","category":"aaa"},{"cat_id":"2","cat_name":"aa","category":"333"}] },
    { "firstname": "manu", "lastname": "mothukuri", "city": "chennai", "street": "manu sivan koiil street", "pin": "600024","data":[{"cat_id":"1","cat_name":"jjj","category":"999"},{"cat_id":"2","cat_name":"bbb","category":"666"}] }
    ]</code></pre>
  </div>
  </div>
  </p>