import * as timezoneData from 'moment-timezone/data/meta/latest.json' interface CountryList { [key: string]: string } interface TzContent { name: string } interface TimezoneContent { [key: string]: TzContent } // getCountriesList returns a list of countries, where the key is the country code and the value is the country name. export function getCountriesList(): CountryList { const countriesData: CountryList = {} const tx: TimezoneContent = timezoneData.countries Object.keys(tx).forEach((z) => { countriesData[z] = tx[z].name }) return countriesData }