load->view('countries.json', '', true) //this will load countries.json $countries = json_decode($countries); ?>