I looked at some other questions such as this and this, but it does not me help me solve my problem. When I console-log my data, I get this:
Object["row_LM#00000010", "row_LM#00000002", "row_LM#00000009", "row_LM#00000008"]
How can I get this in php as a key value pair like row_ : LM#00000010, row_LM#00000002, row_LM#00000009,LM#00000008, so that I can loop each value? I tried JSON.stringify(), I got TypeError: cyclic object value
Here's what I have tried:
$.ajax({
type:'POST',
url:'delinvoices.php',
data:{del_id:JSON.stringify(deleteInvoice)},
success: function(data){
//other codes
}
});
The console.log of deleteInvoice gave me:
Object["row_LM#00000010", "row_LM#00000002", "row_LM#00000009", "row_LM#00000008"]
The base data comes from datatable
var deleteInvoice = dt.rows( { selected: true } ).ids();
Please help.
row_and the value beingLM#00000010, row_LM#00000002, row_LM#00000009,LM#00000008var deleteInvoice = dt.rows( { selected: true } ).ids();