For API - JSON decode returns null, if the data has special character like &,#.
$custom_name = json_decode($request->custom_name);
// custom_name=[{"id":"1","name":"ff#&test"},{"id":"12","name":"test1"}]
print_r($custom_name); // returns null
I displayed json_last_error()
- it display as error code 3
How to handle this data.