Skip to content
Advertisement

Tag: jsondecoder

Convert a json to multi-dimensional PHP array

I have the following json sent to my API endpoint {“key”:”levels”,”value”:”[{role_id:1, access_level_id:3}, {role_id:2, access_level_id:1}, {role_id:3, access_level_id:2}]”,”description”:””} at the backend, I receive it as a Laravel request as follows: And it returns the following expected result array ( ‘key’ => ‘levels’, ‘value’ => ‘[{role_id:1, access_level_id:3}, {role_id:2, access_level_id:1}, {role_id:3, access_level_id:2}]’, ‘description’ => NULL, ) But I need to convert the ‘value’ to

Advertisement