JSON响应抛出为未定义

I' am running into some issues from yesterday. Below are all the details that am currently working with.

PHP

$json = array(
   'total_cost' => '109.38',
    'insurance' => 1
);
echo json_encode( $json );

Console

{"total_cost":109.38,"insurance":"1"}

jQuery

$.post(ajax_url, {'action':action, 'nonce':nonce, 'insurance':insurance}, function( data ){
    data = JSON.parse(data);
    alert( data.total_cost );
});

The above throws 'undefined'. Any idea what am I doing wrong over here?

i think that the problem could be when you use json.parse(data) I leave you a example this works correctly

$.post(url_lista_precios_prod,{id_prod:id_producto}, function(data){

   var ar=data[0]; },'json');

test well