I am returning the following through JSON:
Code:
$this->view->lead_query=$lead_query->fetchALL();
header('OK', true, 200);
header('Content-type: application/json');
echo json_encode($this->view->lead_query);
I am getting the results in this format:
[{"client_name":"Steve Harris","state":"TX"}]
Now if the above output was displayed without the square brackets [] I can populate the values in my form correctly.
Is there a way i can return the output without the square brackets?