0
have this json
{
"MedPaciente": [
{
"ProdutoModel": {
"LaboratorioModel": {
"id_laboratorio": 7951,
"nome": "BOEHRINGER INGELHEIM",
"data_cad": "28/12/2017",
"situacao": 1
},
"id_produto": 232,
"id_laboratorio": 7951,
"codbarras": "7896026300704",
"nome": "ANADOR 500MG 2COMP ",
"situacao": 1,
"alldata": "ANADOR 500MG 2COMP ",
"data_cad": "17/01/2001"
},
"id_med_paciente": 44,
"id_empresa": 1,
"id_consulta": 59,
"id_paciente": 4,
"id_produto": 232,
"qtde_embalagem": 20,
"dose_diaria": 2,
"lote": "1231",
"vencto": null,
"crm": "1325",
"uf_crm": null,
"medico": "aluisio da silva reis",
"dt_lancto": "2018-02-06T00:00:00",
"termino": "2018-02-26T00:00:00",
"tipo": "medicamento",
"qtde": 2
}
}
I need to leave it that way
{
"id_laboratorio": 7951,
"nome": "BOEHRINGER INGELHEIM",
"data_cad": "28/12/2017",
"situacao": 1
"id_produto": 232,
"id_laboratorio": 7951,
"codbarras": "7896026300704",
"nome": "ANADOR 500MG 2COMP ",
"situacao": 1,
"alldata": "ANADOR 500MG 2COMP ",
"data_cad": "17/01/2001"
"id_med_paciente": 44,
"id_empresa": 1,
"id_consulta": 59,
"id_paciente": 4,
"id_produto": 232,
"qtde_embalagem": 20,
"dose_diaria": 2,
"lote": "1231",
"vencto": null,
"crm": "1325",
"uf_crm": null,
"medico": "aluisio da silva reis",
"dt_lancto": "2018-02-06T00:00:00",
"termino": "2018-02-26T00:00:00",
"tipo": "medicamento",
"qtde": 2
}
how can I do this ?
Repeated keys have no way.
– Sam