I'm getting the error trying to parse this code (apologies for format if incorrect - I am new to this):
{
"message": "Please press 1 or 2 to choose the item from your order",
"totalPrice": ${order_res.total_price}, //num
"OrderNum": ${order_res.order_number}, //num
"orderID": ${order_res.order_id}, //num
"customerName": ${order_res.customer_name}, //string
"itemId": [${id}],
"itemName": [${items}],
"itemPrice": [${price}]
}
Error message: Uncaught SyntaxError: Unexpected token d in JSON at position 272
I am sending this JSON as a response, now this response was parsing when received on my backend before I added in the last three items but as they are in the same format I'm not sure why its wrong, could somebody help me please with their more experienced eyes?
Thanks!
String,Number,Booleanwhich may be comprised in the form of eitherObject, orArray.