<php
// $subject->cat as $json
$json = '{"id":13,"name":"Fsc","created_at":"2017-10-23 00:00:00","updated_at":"2017-10-23 00:00:00"}';
$result = json_decode ($json);
// this will produce the following response

$result = stdClass::__set_state(array(
   'id' => 13,
   'name' => 'Fsc',
   'created_at' => '2017-10-23 00:00:00',
   'updated_at' => '2017-10-23 00:00:00',
));
echo $result->id;
?>