Typeahead TypeError: it.toLowerCase is not a function
as what i can see from your console.log()
. you get this.
[{"Outlet":"K-AR3"},{"Outlet":"K-AR4"},{"Outlet":"K-ARN2"},{"Outlet":"K-ARN3"}]
you only need
[{"K-AR3"},{"K-AR4"},{"K-ARN2"},{"K-ARN3"}]
so try to change your controller to
function outletlists()
{
extract(populateform());
$hasil = $this->modelmodel->showdata("SELECT Outlet from transaksi where outlet like '%".$outlets."%' group by Outlet");
$data = array();
foreach ($hasil as $hsl)
{
$data[] = $hsl->Outlet;
}
echo json_encode($data);
}