I have this json_encode
data:
{\"MOT:D44-538JK\":{\"productid\":\"MOT:D44-538JK\",\"qty\":\"1\"}}
When I use json_decode
on the above string it is not working. Any one can assist what parameters need to pass to work.
I have this json_encode
data:
{\"MOT:D44-538JK\":{\"productid\":\"MOT:D44-538JK\",\"qty\":\"1\"}}
When I use json_decode
on the above string it is not working. Any one can assist what parameters need to pass to work.
Your data is encoded already.
php > var_dump(json_decode("{\"MOT:D44-538JK\":{\"productid\":\"MOT:D44-538JK\",\"qty\":\"1\"}}", true));
array(1) {
'MOT:D44-538JK' =>
array(2) {
'productid' =>
string(13) "MOT:D44-538JK"
'qty' =>
string(1) "1"
}
}