Yes! I added this method:
public function get_city_index() {
$cities = get_terms('cities', array( 'hide_empty' => 0 ));
$cities_array[count($cities)];
$i = 0;
foreach($cities as $city){
$cities_array[$i] = $city->slug;
$i++;
}
return array(
'count' => count($cities),
'cities' => $cities_array
);
}
to the core controller, where “cities” is my taxonomy. I know the code can be optimised and all, but that did it for me. I could have returned tons of stuff in that return array, but I needed only the count and the names, so it worked OK.