Flatten data

Hy community,

I am performing a query all on a table with the addition of an addon witch gives me this type of result.

[ {

id:1592,

N_compte:60650000,

Cpt_Resultat_num: [],

matrice_compte_resultat: {

Num_categorie_compte:R030}},

{

id:1593,

N_compte:60660000,

Cpt_Resultat_num: [],

matrice_compte_resultat: {

Num_categorie_compte:R030

}}]

I want the Num_categorie_compte to be the same level as N_compte.

Ideally I would like to have this result

[ {id:1592,

N_compte:60650000,

Num_categorie_compte:R030},

{id:1593,

N_compte:60660000,

Num_categorie_compte:R030}]

Could you help me?

Thank you in advance for your responses.

2 replies