I have infotable A and infotable B.
Ill compare data in both infotable A and infotable B.
Ill delete the matched records in both tables and the uncommon records remains in both the tables infotable A and infotable B.
How it can be done without using for loop?
Any infotable functions will be helpful?
Even if you wouldn't use a for loop, one would have to be used internally, so it doesn't make a difference. You can't do this without iterating the values.
TBH instead of altering the infotables I would just create new ones. This is how you could compute A minus B, assuming you compare on column age.
If you need to compare every property, it's more complex.
let result = Resources["InfoTableFunctions"].CreateInfoTable();
result.AddField({name:"id", baseType:"STRING"});
result.AddField({name:"name", baseType:"STRING"});
result.AddField({name:"age", baseType:"INTEGER"});
let deleteTable = Resources["InfoTableFunctions"].Clone({t1:result});
let resultTable = Resources["InfoTableFunctions"].Clone({t1:result});
result.AddRow({id:"4",name:"A",age:10});
result.AddRow({id:"5",name:"B",age:20});
result.AddRow({id:"6",name:"C",age:30});
result.AddRow({id:"7",name:"D",age:40});
deleteTable.AddRow({id:"6",name:"C",age:30});
deleteTable.AddRow({id:"7",name:"D",age:40});
deleteTable.AddRow({id:"8",name:"E",age:50});
// until here it's just setting up some data. result would be Table A, deleteTable would be Table B
let delArray=deleteTable.rows.toArray().map(r=>r.id);
result.rows.toArray().forEach(row=>{ if (!delArray.includes(row.id)) resultTable.AddRow(row);});
result=resultTable; // A minus B, now repeat to do B minus A