response json

Hi,

when i export datas as json by




Yii::$app->response->format = 'json';

return $data;



json look like




ias: {

1: {

ia_id: "1",

status: "1",

valid: null,

expense: "100000",

discount: 0,

netvalue: "100000",

}

},



but i need number value as real number like




ias: {

1: {

ia_id: 1,

status: 1,

valid: null,

expense: 100000,

discount: 0,

netvalue: 100000,

}

},



in currently i used this code




        Yii::$app->response->format = 'raw';

        return json_encode($datas, JSON_NUMERIC_CHECK);



somebody may help me for set option “JSON_NUMERIC_CHECK” to “Yii::$app->response->format = ‘json’;”

If you need for some reason truncate to number,

you can create a function that truncate this pass $datas and with php access inside.