First, let's convert your JSON to an array.
// The 'true' parameter will convert your
// json to an array instead of an object
$characters = json_decode($json, true);
Now, let's loop through your array to find and replace the dates.
foreach ($characters['instances'] as $instanceKey => $instance) {
foreach ($instance as $key => $value) {
// Add all keys you'd like to change to the below array
if (in_array($key, ['start', 'end', 'date'])) {
$oDate = DateTime::createFromFormat('Y-m-dTH:i:s', $value);
// You can adjust the date format to any format you wish
// in the below format() portion
$characters['instances'][$instanceKey][$key] = $oDate->format('jS F Y h:i');
}
}
}
Now, let's turn it back into a JSON string:
$json = json_encode($characters);
I might've guessed your JSON structure wrong. But I think this will only be a minor adjustment. For any questions, you can of course leave a comment.