It seems like I would be jumping through hoops to move data from MySQL into json via PHP json_encode - the encoding is taken care of, it's the pulling of the related data from the database and ensuring that you have array within array within array setup correctly (code snip below)...is there a json framework or something where you feed it the sql with joined tables and it does all the redundant/confusing work for you?
function people_list() {
$data['jdata'] =
array(
'groups' =>
array(
array(
'name' => 'DeveloperList',
'people' => array(
array('name' => 'sam sneed'),
array('name' => 'sue summer')
)
),
array(
'name' => 'PMList',
'people' => array(
array('name' => 'tim pm'),
array('name' => 'sara pm')
)
),
array(
'name' => 'ClientList',
'people' => array(
array('name' => 'Mr Smith'),
array('name' => 'Ms Jones')
)
)
)
);
$this->load->view('json', $data);
}