When I am trying to run the following mentioned code, I am getting this error,
500 Internal Error Truncated incorrect DOUBLE value: 'undefined'
const JSOnobj = req.body.JSOnobj;
console.log(JSOnobj);
Output of console.log(JSOnobj);
-->
`[{"id":2,"updated_order":1},{"id":3,"updated_order":2},{"id":1,"updated_order":3}]`
From what I can see, your JSOnobj
is a string. You need to parse it before operating on it:
const upOrders = JSON.parse(req.body.upOrders);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments