I have a JSON response that looks like this:
{"order_product_id":"6","design_order":["design_number_1"],"design_number_1":{"sort_order":["Design Number"],"Design Number":"1"}}
I am trying to turn it into a PHP object like this:
$obj = json_decode($data,true);
But $obj is alway null. Can anyone tell me what I am doing wrong?
EDIT
This is my ajax request.
response = JSON.stringify(response);
$.ajax({
type: "POST",
url: "<?php echo $submit_url; ?>",
data: { 'data' :response},
success: function(data){
alert(data);
console.log(data);
}
})