PHP in post.PRE_PROCESS script to modify payload

Hi I’m using dreamfactory as REST API backend to insert data into mysql database.
I need to modify my payload befor it will be insert into database. Expecially I nedd to modify my payload from:

{“Time”:“2018-12-21T07:49:23”,“BME680”:{“Temperature”:20.3,“Humidity”:41.8,“Pressure”:1021.1,“Gas”:286.65}

to:

{“Time”:“2018-12-21T07:49:23”,“Temperature”:20.3,“Humidity”:41.8,“Pressure”:1021.1,“Gas”:286.65}

How can I implement a pre_process script in a post request in php language that can acive my request ?