modify json file

Job ID: 33032804

Budget: $10 – $30 USD

I have a json file with several objects inside.
my goal is: that certain elements inside the objects are grouped in 2 different arrays.
I need the fields of: "codigoArticulo", "descripcion", "importeUnitario", "importe" and "cantidad" to be inside an array called: "detalles".

Then I need the fields of: "codigoTipoPago": 9, "importe", "codigoMoneda": "600" to be inside an array called: "pagos".

everything else can be outside these arrays but inside the object.

I have read that this can be achieved with jq.
I need to get a method to do this modification every day with json from the same schema.
I need each object within this main array to be in the order described. I listen to ideas and budgets.
Related categories: JSON