I'm attempting to post my second array and obtain the id of item() in order to create an item set with that ID. However, I am struggling to achieve this. Here is what I have tried so far, but it does not seem to work:
postArray(){
console.log(this.fg.value)
this.microSvc.Post(this.fg.value)
.subscribe((respo)=>{
this.headerID = respo.id;
for (const item of this.fg.value?.Info){
item.id = this.headerID;
console.log(item.id)
this.microSvc.Post1(item)
.subscribe((response)=>{
for(const itemof this.fg.value?.SetItem){
item.ItemId = this.detailsID
this.microSvc.testing(serial).subscribe((res) =>{
})
}
Swal.fire({
title: 'Added Successfully!',
icon: 'success',
heightAuto: false,
width: 400
}).then((result) => {
if (result.isConfirmed){
}
})
})
}
})
}