I have a dynamic form based on the angular docs, I have a function that lets the user load their saved form. Currently i can patch the values of other form fields like textfield and radiobutton but I cant do it on an array since it's value is an array. I have the following code
if(value instanceof Array){
value.forEach((subVal, index)=>{
let a = subVal.value
this.form.controls[key].patchValue({index,a})
})
//
}else{
this.form.controls[key].patchValue(value);
}