I'm trying to delete the elements inside a multi-dimensional array based on value which is StockNo.
My array is like this:
Array[2]
0: Object
StockNo: "1"
InvoiceNo: "1234"
MaterialName: "MaterialName1"
PONo: "1234"
PRNo: "2124"
Project: "ProjectName"
Qty: "1"
Remarks: "Test"
Supplier: "SupplierName"
TotalAmount: "23"
Type: "2"
Unit: "23"
1: Object
StockNo: "2"
InvoiceNo: "1234"
MaterialName: "MaterialName2"
PONo: "1234"
PRNo: "2124"
Project: "ProjectName2"
Qty: "1"
Remarks: "Test"
Supplier: "SupplierName"
TotalAmount: "23"
Type: "2"
Unit: "23"
The logic is:
var StockNo = 1;
while(//find StockNo in the Multi-dimentional array ){
if(//StockNo found){
//remove element
}
}
How can I do this in jquery?