I am trying to Check two Array list ( any = [] and FormArray) each array list has multiple items
I want to check UoMName and SubBaseUoMCode is equal
if I run this code
for (let i = 0; this.UOMList.length > i; i++) {
console.log( this.UOMList[i].get('UoMName'));
for (let i2 = 0; this.BaseUoMDetails.length > i2; i2++) {
console.log(this.BaseUoMDetails.value[i2].get('UoMName'));
if (this.UOMList[i].get('UoMName') == this.BaseUoMDetails.value[i2].get('SubBaseUoMCode') ) {
console.log("checked");
}
}
debugger
}
I am trying to fix this using (.at, .console). Any ideas?
for (let i = 0; this.UOMList.length > i; i++) {
console.log( this.UOMList[i]['UoMName']);
for (let i2 = 0; this.BaseUoMDetails.length > i2; i2++) {
console.log(this.BaseUoMDetails.value[i2]['UoMName']);
if (this.UOMList[i]['UoMName'] == this.BaseUoMDetails.value[i2]['SubBaseUoMCode'] ) {
console.log("checked");
}
}
debugger
}