I am facing a challenge with deleting items from an array based on two property values.
If we were to compare it to the classic Sql delete command, the equivalent would look something like this:
DELETE oImages WHERE idOffertRow = 1 and idProductImage = 2
I am unsure of how to translate this SQL example into TypeScript.
This is what I have attempted, but it does not seem to work as expected:
this.oImages = this.oImages.filter(function (obj) {
return obj.idOffertRow !== oRow.idOffertRow && obj.idProductImage !== i.idProductImage;
});
Thank you for your support