public function ProcessScheduledListAction() { $scheduled_processes = ProcessScheduled::findByorganisation_id($this->organisation_id); $temp = array(); foreach ($scheduled_processes as $scheduled_process) { $temp[] = array("id" => $scheduled_process->id, "name" => $scheduled_process->name, "description" => $scheduled_process->description); } echo json_encode($temp); }