I find it difficult to create JSON data. I was wanna make out JSON like the picture below
but I'm having trouble. I am only able to make like the picture below
The following code I created. please help me, I am really very confused
foreach ($q->result() as $row){
$djson[] = array(
'id' => $row->id_custome,
'name' => $row->nama_custome
);
}
return $djson;

