I create this function to make it*
I have a control with name 'order', and pass index to him.
{"conditionGroups": [
{
"order": null,
"conditions": []
}
]
}
updateFormData() {
const control = this.form.controls['conditionGroups'];
control.value.map((x,index)=>{
x.order = index;
})