Good evening !!! I have a json that returns in this format:
{rua: "A01", col: "01D", alt: "A"},{rua: "A01", col: "01D", alt: "B"},{rua: "A01", col: "01D", alt: "C"},{rua: "A01", col: "01D", alt: "D"}
But I need you to return in this format:
{rua: "A01",end:{col: "01D",comp:{alt: "A",alt: "B",alt: "C",alt: "D"}
{rua: "A01",end:{col: "02D",comp:{alt: "A",alt: "B",alt: "C",alt: "D"}
My php looks like this:
while ($query=mysqli_fetch_array($res)) {
$array_end[] = array(
'rua' => $query['rua'],
'col' => $query['coluna'],
'alt' => $query['altura'],
);
}
Can anyone help? Many thanks!