Last active
July 19, 2017 04:49
-
-
Save anirudhamahale/d2b1d34765a1d6411ed16c10dec3b100 to your computer and use it in GitHub Desktop.
Parse phone number (country code, number)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375","code":"BY"},{"name":"Belgium","dial_code":"+32","code":"BE"},{"name":"Belize","dial_code":"+501","code":"BZ"},{"name":"Benin","dial_code":"+229","code":"BJ"},{"name":"Bermuda","dial_code":"+1 441","code":"BM"},{"name":"Bhutan","dial_code":"+975","code":"BT"},{"name":"Bosnia and Herzegovina","dial_code":"+387","code":"BA"},{"name":"Botswana","dial_code":"+267","code":"BW"},{"name":"Brazil","dial_code":"+55","code":"BR"},{"name":"British Indian Ocean Territory","dial_code":"+246","code":"IO"},{"name":"Bulgaria","dial_code":"+359","code":"BG"},{"name":"Burkina Faso","dial_code":"+226","code":"BF"},{"name":"Burundi","dial_code":"+257","code":"BI"},{"name":"Cambodia","dial_code":"+855","code":"KH"},{"name":"Cameroon","dial_code":"+237","code":"CM"},{"name":"Canada","dial_code":"+1","code":"CA"},{"name":"Cape Verde","dial_code":"+238","code":"CV"},{"name":"Cayman Islands","dial_code":"+ 345","code":"KY"},{"name":"Central African Republic","dial_code":"+236","code":"CF"},{"name":"Chad","dial_code":"+235","code":"TD"},{"name":"Chile","dial_code":"+56","code":"CL"},{"name":"China","dial_code":"+86","code":"CN"},{"name":"Christmas Island","dial_code":"+61","code":"CX"},{"name":"Colombia","dial_code":"+57","code":"CO"},{"name":"Comoros","dial_code":"+269","code":"KM"},{"name":"Congo","dial_code":"+242","code":"CG"},{"name":"Cook Islands","dial_code":"+682","code":"CK"},{"name":"Costa Rica","dial_code":"+506","code":"CR"},{"name":"Croatia","dial_code":"+385","code":"HR"},{"name":"Cuba","dial_code":"+53","code":"CU"},{"name":"Cyprus","dial_code":"+537","code":"CY"},{"name":"Czech Republic","dial_code":"+420","code":"CZ"},{"name":"Denmark","dial_code":"+45","code":"DK"},{"name":"Djibouti","dial_code":"+253","code":"DJ"},{"name":"Dominica","dial_code":"+1 767","code":"DM"},{"name":"Dominican Republic","dial_code":"+1 849","code":"DO"},{"name":"Ecuador","dial_code":"+593","code":"EC"},{"name":"Egypt","dial_code":"+20","code":"EG"},{"name":"El Salvador","dial_code":"+503","code":"SV"},{"name":"Equatorial Guinea","dial_code":"+240","code":"GQ"},{"name":"Eritrea","dial_code":"+291","code":"ER"},{"name":"Estonia","dial_code":"+372","code":"EE"},{"name":"Ethiopia","dial_code":"+251","code":"ET"},{"name":"Faroe Islands","dial_code":"+298","code":"FO"},{"name":"Fiji","dial_code":"+679","code":"FJ"},{"name":"Finland","dial_code":"+358","code":"FI"},{"name":"France","dial_code":"+33","code":"FR"},{"name":"French Guiana","dial_code":"+594","code":"GF"},{"name":"French Polynesia","dial_code":"+689","code":"PF"},{"name":"Gabon","dial_code":"+241","code":"GA"},{"name":"Gambia","dial_code":"+220","code":"GM"},{"name":"Georgia","dial_code":"+995","code":"GE"},{"name":"Germany","dial_code":"+49","code":"DE"},{"name":"Ghana","dial_code":"+233","code":"GH"},{"name":"Gibraltar","dial_code":"+350","code":"GI"},{"name":"Greece","dial_code":"+30","code":"GR"},{"name":"Greenland","dial_code":"+299","code":"GL"},{"name":"Grenada","dial_code":"+1 473","code":"GD"},{"name":"Guadeloupe","dial_code":"+590","code":"GP"},{"name":"Guam","dial_code":"+1 671","code":"GU"},{"name":"Guatemala","dial_code":"+502","code":"GT"},{"name":"Guinea","dial_code":"+224","code":"GN"},{"name":"Guinea-Bissau","dial_code":"+245","code":"GW"},{"name":"Guyana","dial_code":"+595","code":"GY"},{"name":"Haiti","dial_code":"+509","code":"HT"},{"name":"Honduras","dial_code":"+504","code":"HN"},{"name":"Hungary","dial_code":"+36","code":"HU"},{"name":"Iceland","dial_code":"+354","code":"IS"},{"name":"India","dial_code":"+91","code":"IN"},{"name":"Indonesia","dial_code":"+62","code":"ID"},{"name":"Iraq","dial_code":"+964","code":"IQ"},{"name":"Ireland","dial_code":"+353","code":"IE"},{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Italy","dial_code":"+39","code":"IT"},{"name":"Jamaica","dial_code":"+1 876","code":"JM"},{"name":"Japan","dial_code":"+81","code":"JP"},{"name":"Jordan","dial_code":"+962","code":"JO"},{"name":"Kazakhstan","dial_code":"+7 7","code":"KZ"},{"name":"Kenya","dial_code":"+254","code":"KE"},{"name":"Kiribati","dial_code":"+686","code":"KI"},{"name":"Kuwait","dial_code":"+965","code":"KW"},{"name":"Kyrgyzstan","dial_code":"+996","code":"KG"},{"name":"Latvia","dial_code":"+371","code":"LV"},{"name":"Lebanon","dial_code":"+961","code":"LB"},{"name":"Lesotho","dial_code":"+266","code":"LS"},{"name":"Liberia","dial_code":"+231","code":"LR"},{"name":"Liechtenstein","dial_code":"+423","code":"LI"},{"name":"Lithuania","dial_code":"+370","code":"LT"},{"name":"Luxembourg","dial_code":"+352","code":"LU"},{"name":"Madagascar","dial_code":"+261","code":"MG"},{"name":"Malawi","dial_code":"+265","code":"MW"},{"name":"Malaysia","dial_code":"+60","code":"MY"},{"name":"Maldives","dial_code":"+960","code":"MV"},{"name":"Mali","dial_code":"+223","code":"ML"},{"name":"Malta","dial_code":"+356","code":"MT"},{"name":"Marshall Islands","dial_code":"+692","code":"MH"},{"name":"Martinique","dial_code":"+596","code":"MQ"},{"name":"Mauritania","dial_code":"+222","code":"MR"},{"name":"Mauritius","dial_code":"+230","code":"MU"},{"name":"Mayotte","dial_code":"+262","code":"YT"},{"name":"Mexico","dial_code":"+52","code":"MX"},{"name":"Monaco","dial_code":"+377","code":"MC"},{"name":"Mongolia","dial_code":"+976","code":"MN"},{"name":"Montenegro","dial_code":"+382","code":"ME"},{"name":"Montserrat","dial_code":"+1664","code":"MS"},{"name":"Morocco","dial_code":"+212","code":"MA"},{"name":"Myanmar","dial_code":"+95","code":"MM"},{"name":"Namibia","dial_code":"+264","code":"NA"},{"name":"Nauru","dial_code":"+674","code":"NR"},{"name":"Nepal","dial_code":"+977","code":"NP"},{"name":"Netherlands","dial_code":"+31","code":"NL"},{"name":"Netherlands Antilles","dial_code":"+599","code":"AN"},{"name":"New Caledonia","dial_code":"+687","code":"NC"},{"name":"New Zealand","dial_code":"+64","code":"NZ"},{"name":"Nicaragua","dial_code":"+505","code":"NI"},{"name":"Niger","dial_code":"+227","code":"NE"},{"name":"Nigeria","dial_code":"+234","code":"NG"},{"name":"Niue","dial_code":"+683","code":"NU"},{"name":"Norfolk Island","dial_code":"+672","code":"NF"},{"name":"Northern Mariana Islands","dial_code":"+1 670","code":"MP"},{"name":"Norway","dial_code":"+47","code":"NO"},{"name":"Oman","dial_code":"+968","code":"OM"},{"name":"Pakistan","dial_code":"+92","code":"PK"},{"name":"Palau","dial_code":"+680","code":"PW"},{"name":"Panama","dial_code":"+507","code":"PA"},{"name":"Papua New Guinea","dial_code":"+675","code":"PG"},{"name":"Paraguay","dial_code":"+595","code":"PY"},{"name":"Peru","dial_code":"+51","code":"PE"},{"name":"Philippines","dial_code":"+63","code":"PH"},{"name":"Poland","dial_code":"+48","code":"PL"},{"name":"Portugal","dial_code":"+351","code":"PT"},{"name":"Puerto Rico","dial_code":"+1 939","code":"PR"},{"name":"Qatar","dial_code":"+974","code":"QA"},{"name":"Romania","dial_code":"+40","code":"RO"},{"name":"Rwanda","dial_code":"+250","code":"RW"},{"name":"Samoa","dial_code":"+685","code":"WS"},{"name":"San Marino","dial_code":"+378","code":"SM"},{"name":"Saudi Arabia","dial_code":"+966","code":"SA"},{"name":"Senegal","dial_code":"+221","code":"SN"},{"name":"Serbia","dial_code":"+381","code":"RS"},{"name":"Seychelles","dial_code":"+248","code":"SC"},{"name":"Sierra Leone","dial_code":"+232","code":"SL"},{"name":"Singapore","dial_code":"+65","code":"SG"},{"name":"Slovakia","dial_code":"+421","code":"SK"},{"name":"Slovenia","dial_code":"+386","code":"SI"},{"name":"Solomon Islands","dial_code":"+677","code":"SB"},{"name":"South Africa","dial_code":"+27","code":"ZA"},{"name":"South Georgia and the South Sandwich Islands","dial_code":"+500","code":"GS"},{"name":"Spain","dial_code":"+34","code":"ES"},{"name":"Sri Lanka","dial_code":"+94","code":"LK"},{"name":"Sudan","dial_code":"+249","code":"SD"},{"name":"Suriname","dial_code":"+597","code":"SR"},{"name":"Swaziland","dial_code":"+268","code":"SZ"},{"name":"Sweden","dial_code":"+46","code":"SE"},{"name":"Switzerland","dial_code":"+41","code":"CH"},{"name":"Tajikistan","dial_code":"+992","code":"TJ"},{"name":"Thailand","dial_code":"+66","code":"TH"},{"name":"Togo","dial_code":"+228","code":"TG"},{"name":"Tokelau","dial_code":"+690","code":"TK"},{"name":"Tonga","dial_code":"+676","code":"TO"},{"name":"Trinidad and Tobago","dial_code":"+1 868","code":"TT"},{"name":"Tunisia","dial_code":"+216","code":"TN"},{"name":"Turkey","dial_code":"+90","code":"TR"},{"name":"Turkmenistan","dial_code":"+993","code":"TM"},{"name":"Turks and Caicos Islands","dial_code":"+1 649","code":"TC"},{"name":"Tuvalu","dial_code":"+688","code":"TV"},{"name":"Uganda","dial_code":"+256","code":"UG"},{"name":"Ukraine","dial_code":"+380","code":"UA"},{"name":"United Arab Emirates","dial_code":"+971","code":"AE"},{"name":"United Kingdom","dial_code":"+44","code":"GB"},{"name":"United States","dial_code":"+1","code":"US"},{"name":"Uruguay","dial_code":"+598","code":"UY"},{"name":"Uzbekistan","dial_code":"+998","code":"UZ"},{"name":"Vanuatu","dial_code":"+678","code":"VU"},{"name":"Wallis and Futuna","dial_code":"+681","code":"WF"},{"name":"Yemen","dial_code":"+967","code":"YE"},{"name":"Zambia","dial_code":"+260","code":"ZM"},{"name":"Zimbabwe","dial_code":"+263","code":"ZW"},{"name":"land Islands","dial_code":"","code":"AX"},{"name":"Antarctica","dial_code":null,"code":"AQ"},{"name":"Bolivia, Plurinational State of","dial_code":"+591","code":"BO"},{"name":"Brunei Darussalam","dial_code":"+673","code":"BN"},{"name":"Cocos (Keeling) Islands","dial_code":"+61","code":"CC"},{"name":"Congo, The Democratic Republic of the","dial_code":"+243","code":"CD"},{"name":"Cote d'Ivoire","dial_code":"+225","code":"CI"},{"name":"Falkland Islands (Malvinas)","dial_code":"+500","code":"FK"},{"name":"Guernsey","dial_code":"+44","code":"GG"},{"name":"Holy See (Vatican City State)","dial_code":"+379","code":"VA"},{"name":"Hong Kong","dial_code":"+852","code":"HK"},{"name":"Iran, Islamic Republic of","dial_code":"+98","code":"IR"},{"name":"Isle of Man","dial_code":"+44","code":"IM"},{"name":"Jersey","dial_code":"+44","code":"JE"},{"name":"Korea, Democratic People's Republic of","dial_code":"+850","code":"KP"},{"name":"Korea, Republic of","dial_code":"+82","code":"KR"},{"name":"Lao People's Democratic Republic","dial_code":"+856","code":"LA"},{"name":"Libyan Arab Jamahiriya","dial_code":"+218","code":"LY"},{"name":"Macao","dial_code":"+853","code":"MO"},{"name":"Macedonia, The Former Yugoslav Republic of","dial_code":"+389","code":"MK"},{"name":"Micronesia, Federated States of","dial_code":"+691","code":"FM"},{"name":"Moldova, Republic of","dial_code":"+373","code":"MD"},{"name":"Mozambique","dial_code":"+258","code":"MZ"},{"name":"Palestinian Territory, Occupied","dial_code":"+970","code":"PS"},{"name":"Pitcairn","dial_code":"+872","code":"PN"},{"name":"Réunion","dial_code":"+262","code":"RE"},{"name":"Russia","dial_code":"+7","code":"RU"},{"name":"Saint Barthélemy","dial_code":"+590","code":"BL"},{"name":"Saint Helena, Ascension and Tristan Da Cunha","dial_code":"+290","code":"SH"},{"name":"Saint Kitts and Nevis","dial_code":"+1 869","code":"KN"},{"name":"Saint Lucia","dial_code":"+1 758","code":"LC"},{"name":"Saint Martin","dial_code":"+590","code":"MF"},{"name":"Saint Pierre and Miquelon","dial_code":"+508","code":"PM"},{"name":"Saint Vincent and the Grenadines","dial_code":"+1 784","code":"VC"},{"name":"Sao Tome and Principe","dial_code":"+239","code":"ST"},{"name":"Somalia","dial_code":"+252","code":"SO"},{"name":"Svalbard and Jan Mayen","dial_code":"+47","code":"SJ"},{"name":"Syrian Arab Republic","dial_code":"+963","code":"SY"},{"name":"Taiwan, Province of China","dial_code":"+886","code":"TW"},{"name":"Tanzania, United Republic of","dial_code":"+255","code":"TZ"},{"name":"Timor-Leste","dial_code":"+670","code":"TL"},{"name":"Venezuela, Bolivarian Republic of","dial_code":"+58","code":"VE"},{"name":"Viet Nam","dial_code":"+84","code":"VN"},{"name":"Virgin Islands, British","dial_code":"+1 284","code":"VG"},{"name":"Virgin Islands, U.S.","dial_code":"+1 340","code":"VI"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"DistrictId":1,"DistrictName":"Nicobar","StateId":1}, | |
{"DistrictId":2,"DistrictName":"North and Middle Andaman","StateId":1}, | |
{"DistrictId":3,"DistrictName":"South Andaman","StateId":1}, | |
{"DistrictId":4,"DistrictName":"Anantapur","StateId":2}, | |
{"DistrictId":5,"DistrictName":"Chittoor","StateId":2}, | |
{"DistrictId":6,"DistrictName":"Cuddapah","StateId":2}, | |
{"DistrictId":7,"DistrictName":"East Godavari","StateId":2}, | |
{"DistrictId":8,"DistrictName":"Guntur","StateId":2}, | |
{"DistrictId":9,"DistrictName":"Krishna","StateId":2}, | |
{"DistrictId":10,"DistrictName":"Kurnool","StateId":2}, | |
{"DistrictId":11,"DistrictName":"Nellore","StateId":2}, | |
{"DistrictId":12,"DistrictName":"Prakasam","StateId":2}, | |
{"DistrictId":13,"DistrictName":"Srikakulam","StateId":2}, | |
{"DistrictId":14,"DistrictName":"Visakhapatnam","StateId":2}, | |
{"DistrictId":15,"DistrictName":"Vizianagaram","StateId":2}, | |
{"DistrictId":16,"DistrictName":"West Godavari","StateId":2}, | |
{"DistrictId":17,"DistrictName":"Anjaw","StateId":3}, | |
{"DistrictId":18,"DistrictName":"Changlang","StateId":3}, | |
{"DistrictId":19,"DistrictName":"Dibang Valley","StateId":3}, | |
{"DistrictId":20,"DistrictName":"East Kameng","StateId":3}, | |
{"DistrictId":21,"DistrictName":"East Siang","StateId":3}, | |
{"DistrictId":22,"DistrictName":"Kurung Kumey","StateId":3}, | |
{"DistrictId":23,"DistrictName":"Lohit","StateId":3}, | |
{"DistrictId":24,"DistrictName":"Longding","StateId":3}, | |
{"DistrictId":25,"DistrictName":"Lower Dibang Valley","StateId":3}, | |
{"DistrictId":26,"DistrictName":"Lower Subansiri","StateId":3}, | |
{"DistrictId":27,"DistrictName":"Papum Pare","StateId":3}, | |
{"DistrictId":28,"DistrictName":"Tawang","StateId":3}, | |
{"DistrictId":29,"DistrictName":"Tirap","StateId":3}, | |
{"DistrictId":30,"DistrictName":"Upper Siang","StateId":3}, | |
{"DistrictId":31,"DistrictName":"Upper Subansiri","StateId":3}, | |
{"DistrictId":32,"DistrictName":"West Kameng","StateId":3}, | |
{"DistrictId":33,"DistrictName":"West Siang","StateId":3}, | |
{"DistrictId":34,"DistrictName":"Baksa","StateId":4}, | |
{"DistrictId":35,"DistrictName":"Barpeta","StateId":4}, | |
{"DistrictId":36,"DistrictName":"Bongaigaon","StateId":4}, | |
{"DistrictId":37,"DistrictName":"Cachar","StateId":4}, | |
{"DistrictId":38,"DistrictName":"Chirang","StateId":4}, | |
{"DistrictId":39,"DistrictName":"Darrang","StateId":4}, | |
{"DistrictId":40,"DistrictName":"Dhemaji","StateId":4}, | |
{"DistrictId":41,"DistrictName":"Dhubri","StateId":4}, | |
{"DistrictId":42,"DistrictName":"Dibrugarh","StateId":4}, | |
{"DistrictId":43,"DistrictName":"Dima Hasao","StateId":4}, | |
{"DistrictId":44,"DistrictName":"Goalpara","StateId":4}, | |
{"DistrictId":45,"DistrictName":"Golaghat","StateId":4}, | |
{"DistrictId":46,"DistrictName":"Hailakandi","StateId":4}, | |
{"DistrictId":47,"DistrictName":"Jorhat","StateId":4}, | |
{"DistrictId":48,"DistrictName":"Kamrup Metropolitan","StateId":4}, | |
{"DistrictId":49,"DistrictName":"Kamrup","StateId":4}, | |
{"DistrictId":50,"DistrictName":"Karbi Anglong","StateId":4}, | |
{"DistrictId":51,"DistrictName":"Karimganj","StateId":4}, | |
{"DistrictId":52,"DistrictName":"Kokrajhar","StateId":4}, | |
{"DistrictId":53,"DistrictName":"Lakhimpur","StateId":4}, | |
{"DistrictId":54,"DistrictName":"Morigaon","StateId":4}, | |
{"DistrictId":55,"DistrictName":"Nagaon","StateId":4}, | |
{"DistrictId":56,"DistrictName":"Nalbari","StateId":4}, | |
{"DistrictId":57,"DistrictName":"Sivasagar","StateId":4}, | |
{"DistrictId":58,"DistrictName":"Sonitpur","StateId":4}, | |
{"DistrictId":59,"DistrictName":"Tinsukia","StateId":4}, | |
{"DistrictId":60,"DistrictName":"Udalguri","StateId":4}, | |
{"DistrictId":61,"DistrictName":"Araria","StateId":5}, | |
{"DistrictId":62,"DistrictName":"Arwal","StateId":5}, | |
{"DistrictId":63,"DistrictName":"Aurangabad","StateId":5}, | |
{"DistrictId":64,"DistrictName":"Banka","StateId":5}, | |
{"DistrictId":65,"DistrictName":"Begusarai","StateId":5}, | |
{"DistrictId":66,"DistrictName":"Bhagalpur","StateId":5}, | |
{"DistrictId":67,"DistrictName":"Bhojpur","StateId":5}, | |
{"DistrictId":68,"DistrictName":"Buxar","StateId":5}, | |
{"DistrictId":69,"DistrictName":"Darbhanga","StateId":5}, | |
{"DistrictId":70,"DistrictName":"East Champaran (Motihari)","StateId":5}, | |
{"DistrictId":71,"DistrictName":"Gaya","StateId":5}, | |
{"DistrictId":72,"DistrictName":"Gopalganj","StateId":5}, | |
{"DistrictId":73,"DistrictName":"Jamui","StateId":5}, | |
{"DistrictId":74,"DistrictName":"Jehanabad","StateId":5}, | |
{"DistrictId":75,"DistrictName":"Kaimur (Bhabua)","StateId":5}, | |
{"DistrictId":76,"DistrictName":"Katihar","StateId":5}, | |
{"DistrictId":77,"DistrictName":"Khagaria","StateId":5}, | |
{"DistrictId":78,"DistrictName":"Kishanganj","StateId":5}, | |
{"DistrictId":79,"DistrictName":"Lakhisarai","StateId":5}, | |
{"DistrictId":80,"DistrictName":"Madhepura","StateId":5}, | |
{"DistrictId":81,"DistrictName":"Madhubani","StateId":5}, | |
{"DistrictId":82,"DistrictName":"Munger (Monghyr)","StateId":5}, | |
{"DistrictId":83,"DistrictName":"Muzaffarpur","StateId":5}, | |
{"DistrictId":84,"DistrictName":"Nalanda","StateId":5}, | |
{"DistrictId":85,"DistrictName":"Nawada","StateId":5}, | |
{"DistrictId":86,"DistrictName":"Patna","StateId":5}, | |
{"DistrictId":87,"DistrictName":"Purnia (Purnea)","StateId":5}, | |
{"DistrictId":88,"DistrictName":"Rohtas","StateId":5}, | |
{"DistrictId":89,"DistrictName":"Saharsa","StateId":5}, | |
{"DistrictId":90,"DistrictName":"Samastipur","StateId":5}, | |
{"DistrictId":91,"DistrictName":"Saran","StateId":5}, | |
{"DistrictId":92,"DistrictName":"Sheikhpura","StateId":5}, | |
{"DistrictId":93,"DistrictName":"Sheohar","StateId":5}, | |
{"DistrictId":94,"DistrictName":"Sitamarhi","StateId":5}, | |
{"DistrictId":95,"DistrictName":"Siwan","StateId":5}, | |
{"DistrictId":96,"DistrictName":"Supaul","StateId":5}, | |
{"DistrictId":97,"DistrictName":"Vaishali","StateId":5}, | |
{"DistrictId":98,"DistrictName":"West Champaran","StateId":5}, | |
{"DistrictId":99,"DistrictName":"Chandigarh","StateId":6}, | |
{"DistrictId":100,"DistrictName":"Balod","StateId":7}, | |
{"DistrictId":101,"DistrictName":"Baloda Bazar","StateId":7}, | |
{"DistrictId":102,"DistrictName":"Balrampur","StateId":7}, | |
{"DistrictId":103,"DistrictName":"Bastar","StateId":7}, | |
{"DistrictId":104,"DistrictName":"Bemetara","StateId":7}, | |
{"DistrictId":105,"DistrictName":"Bijapur","StateId":7}, | |
{"DistrictId":106,"DistrictName":"Bilaspur","StateId":7}, | |
{"DistrictId":107,"DistrictName":"Dantewada (South Bastar)","StateId":7}, | |
{"DistrictId":108,"DistrictName":"Dhamtari","StateId":7}, | |
{"DistrictId":109,"DistrictName":"Durg","StateId":7}, | |
{"DistrictId":110,"DistrictName":"Gariaband","StateId":7}, | |
{"DistrictId":111,"DistrictName":"Janjgir-Champa","StateId":7}, | |
{"DistrictId":112,"DistrictName":"Jashpur","StateId":7}, | |
{"DistrictId":113,"DistrictName":"Kabirdham (Kawardha)","StateId":7}, | |
{"DistrictId":114,"DistrictName":"Kanker (North Bastar)","StateId":7}, | |
{"DistrictId":115,"DistrictName":"Kondagaon","StateId":7}, | |
{"DistrictId":116,"DistrictName":"Korba","StateId":7}, | |
{"DistrictId":117,"DistrictName":"Korea (Koriya)","StateId":7}, | |
{"DistrictId":118,"DistrictName":"Mahasamund","StateId":7}, | |
{"DistrictId":119,"DistrictName":"Mungeli","StateId":7}, | |
{"DistrictId":120,"DistrictName":"Narayanpur","StateId":7}, | |
{"DistrictId":121,"DistrictName":"Raigarh","StateId":7}, | |
{"DistrictId":122,"DistrictName":"Raipur","StateId":7}, | |
{"DistrictId":123,"DistrictName":"Rajnandgaon","StateId":7}, | |
{"DistrictId":124,"DistrictName":"Sukma","StateId":7}, | |
{"DistrictId":125,"DistrictName":"Surajpur","StateId":7}, | |
{"DistrictId":126,"DistrictName":"Surguja","StateId":7}, | |
{"DistrictId":127,"DistrictName":"Dadra & Nagar Haveli","StateId":8}, | |
{"DistrictId":128,"DistrictName":"Daman","StateId":9}, | |
{"DistrictId":129,"DistrictName":"Diu","StateId":9}, | |
{"DistrictId":130,"DistrictName":"Central Delhi","StateId":10}, | |
{"DistrictId":131,"DistrictName":"East Delhi","StateId":10}, | |
{"DistrictId":132,"DistrictName":"New Delhi","StateId":10}, | |
{"DistrictId":133,"DistrictName":"North Delhi","StateId":10}, | |
{"DistrictId":134,"DistrictName":"North East Delhi","StateId":10}, | |
{"DistrictId":135,"DistrictName":"North West Delhi","StateId":10}, | |
{"DistrictId":136,"DistrictName":"South Delhi","StateId":10}, | |
{"DistrictId":137,"DistrictName":"South West Delhi","StateId":10}, | |
{"DistrictId":138,"DistrictName":"West Delhi","StateId":10}, | |
{"DistrictId":139,"DistrictName":"North Goa","StateId":11}, | |
{"DistrictId":140,"DistrictName":"South Goa","StateId":11}, | |
{"DistrictId":141,"DistrictName":"Ahmedabad","StateId":12}, | |
{"DistrictId":142,"DistrictName":"Amreli","StateId":12}, | |
{"DistrictId":143,"DistrictName":"Anand","StateId":12}, | |
{"DistrictId":144,"DistrictName":"Aravalli","StateId":12}, | |
{"DistrictId":145,"DistrictName":"Banaskantha (Palanpur)","StateId":12}, | |
{"DistrictId":146,"DistrictName":"Bharuch","StateId":12}, | |
{"DistrictId":147,"DistrictName":"Bhavnagar","StateId":12}, | |
{"DistrictId":148,"DistrictName":"Botad","StateId":12}, | |
{"DistrictId":149,"DistrictName":"Chhota Udepur","StateId":12}, | |
{"DistrictId":150,"DistrictName":"Dahod","StateId":12}, | |
{"DistrictId":151,"DistrictName":"Dangs (Ahwa)","StateId":12}, | |
{"DistrictId":152,"DistrictName":"Devbhoomi Dwarka","StateId":12}, | |
{"DistrictId":153,"DistrictName":"Gandhinagar","StateId":12}, | |
{"DistrictId":154,"DistrictName":"Gir Somnath","StateId":12}, | |
{"DistrictId":155,"DistrictName":"Jamnagar","StateId":12}, | |
{"DistrictId":156,"DistrictName":"Junagadh","StateId":12}, | |
{"DistrictId":157,"DistrictName":"Kachchh","StateId":12}, | |
{"DistrictId":158,"DistrictName":"Kheda (Nadiad)","StateId":12}, | |
{"DistrictId":159,"DistrictName":"Mahisagar","StateId":12}, | |
{"DistrictId":160,"DistrictName":"Mehsana","StateId":12}, | |
{"DistrictId":161,"DistrictName":"Morbi","StateId":12}, | |
{"DistrictId":162,"DistrictName":"Narmada (Rajpipla)","StateId":12}, | |
{"DistrictId":163,"DistrictName":"Navsari","StateId":12}, | |
{"DistrictId":164,"DistrictName":"Panchmahal (Godhra)","StateId":12}, | |
{"DistrictId":165,"DistrictName":"Patan","StateId":12}, | |
{"DistrictId":166,"DistrictName":"Porbandar","StateId":12}, | |
{"DistrictId":167,"DistrictName":"Rajkot","StateId":12}, | |
{"DistrictId":168,"DistrictName":"Sabarkantha (Himmatnagar)","StateId":12}, | |
{"DistrictId":169,"DistrictName":"Surat","StateId":12}, | |
{"DistrictId":170,"DistrictName":"Surendranagar","StateId":12}, | |
{"DistrictId":171,"DistrictName":"Tapi (Vyara)","StateId":12}, | |
{"DistrictId":172,"DistrictName":"Vadodara","StateId":12}, | |
{"DistrictId":173,"DistrictName":"Valsad","StateId":12}, | |
{"DistrictId":174,"DistrictName":"Ambala","StateId":13}, | |
{"DistrictId":175,"DistrictName":"Bhiwani","StateId":13}, | |
{"DistrictId":176,"DistrictName":"Faridabad","StateId":13}, | |
{"DistrictId":177,"DistrictName":"Fatehabad","StateId":13}, | |
{"DistrictId":178,"DistrictName":"Gurgaon","StateId":13}, | |
{"DistrictId":179,"DistrictName":"Hisar","StateId":13}, | |
{"DistrictId":180,"DistrictName":"Jhajjar","StateId":13}, | |
{"DistrictId":181,"DistrictName":"Jind","StateId":13}, | |
{"DistrictId":182,"DistrictName":"Kaithal","StateId":13}, | |
{"DistrictId":183,"DistrictName":"Karnal","StateId":13}, | |
{"DistrictId":184,"DistrictName":"Kurukshetra","StateId":13}, | |
{"DistrictId":185,"DistrictName":"Mahendragarh","StateId":13}, | |
{"DistrictId":186,"DistrictName":"Mewat","StateId":13}, | |
{"DistrictId":187,"DistrictName":"Palwal","StateId":13}, | |
{"DistrictId":188,"DistrictName":"Panchkula","StateId":13}, | |
{"DistrictId":189,"DistrictName":"Panipat","StateId":13}, | |
{"DistrictId":190,"DistrictName":"Rewari","StateId":13}, | |
{"DistrictId":191,"DistrictName":"Rohtak","StateId":13}, | |
{"DistrictId":192,"DistrictName":"Sirsa","StateId":13}, | |
{"DistrictId":193,"DistrictName":"Sonipat","StateId":13}, | |
{"DistrictId":194,"DistrictName":"Yamunanagar","StateId":13}, | |
{"DistrictId":195,"DistrictName":"Bilaspur","StateId":14}, | |
{"DistrictId":196,"DistrictName":"Chamba","StateId":14}, | |
{"DistrictId":197,"DistrictName":"Hamirpur","StateId":14}, | |
{"DistrictId":198,"DistrictName":"Kangra","StateId":14}, | |
{"DistrictId":199,"DistrictName":"Kinnaur","StateId":14}, | |
{"DistrictId":200,"DistrictName":"Kullu","StateId":14}, | |
{"DistrictId":201,"DistrictName":"Lahaul & Spiti","StateId":14}, | |
{"DistrictId":202,"DistrictName":"Mandi","StateId":14}, | |
{"DistrictId":203,"DistrictName":"Shimla","StateId":14}, | |
{"DistrictId":204,"DistrictName":"Sirmaur (Sirmour)","StateId":14}, | |
{"DistrictId":205,"DistrictName":"Solan","StateId":14}, | |
{"DistrictId":206,"DistrictName":"Una","StateId":14}, | |
{"DistrictId":207,"DistrictName":"Anantnag","StateId":15}, | |
{"DistrictId":208,"DistrictName":"Bandipora","StateId":15}, | |
{"DistrictId":209,"DistrictName":"Baramulla","StateId":15}, | |
{"DistrictId":210,"DistrictName":"Budgam","StateId":15}, | |
{"DistrictId":211,"DistrictName":"Doda","StateId":15}, | |
{"DistrictId":212,"DistrictName":"Ganderbal","StateId":15}, | |
{"DistrictId":213,"DistrictName":"Jammu","StateId":15}, | |
{"DistrictId":214,"DistrictName":"Kargil","StateId":15}, | |
{"DistrictId":215,"DistrictName":"Kathua","StateId":15}, | |
{"DistrictId":216,"DistrictName":"Kishtwar","StateId":15}, | |
{"DistrictId":217,"DistrictName":"Kulgam","StateId":15}, | |
{"DistrictId":218,"DistrictName":"Kupwara","StateId":15}, | |
{"DistrictId":219,"DistrictName":"Leh","StateId":15}, | |
{"DistrictId":220,"DistrictName":"Poonch","StateId":15}, | |
{"DistrictId":221,"DistrictName":"Pulwama","StateId":15}, | |
{"DistrictId":222,"DistrictName":"Rajouri","StateId":15}, | |
{"DistrictId":223,"DistrictName":"Ramban","StateId":15}, | |
{"DistrictId":224,"DistrictName":"Reasi","StateId":15}, | |
{"DistrictId":225,"DistrictName":"Samba","StateId":15}, | |
{"DistrictId":226,"DistrictName":"Shopian","StateId":15}, | |
{"DistrictId":227,"DistrictName":"Srinagar","StateId":15}, | |
{"DistrictId":228,"DistrictName":"Udhampur","StateId":15}, | |
{"DistrictId":229,"DistrictName":"Bokaro","StateId":16}, | |
{"DistrictId":230,"DistrictName":"Chatra","StateId":16}, | |
{"DistrictId":231,"DistrictName":"Deoghar","StateId":16}, | |
{"DistrictId":232,"DistrictName":"Dhanbad","StateId":16}, | |
{"DistrictId":233,"DistrictName":"Dumka","StateId":16}, | |
{"DistrictId":234,"DistrictName":"East Singhbhum","StateId":16}, | |
{"DistrictId":235,"DistrictName":"Garhwa","StateId":16}, | |
{"DistrictId":236,"DistrictName":"Giridih","StateId":16}, | |
{"DistrictId":237,"DistrictName":"Godda","StateId":16}, | |
{"DistrictId":238,"DistrictName":"Gumla","StateId":16}, | |
{"DistrictId":239,"DistrictName":"Hazaribag","StateId":16}, | |
{"DistrictId":240,"DistrictName":"Jamtara","StateId":16}, | |
{"DistrictId":241,"DistrictName":"Khunti","StateId":16}, | |
{"DistrictId":242,"DistrictName":"Koderma","StateId":16}, | |
{"DistrictId":243,"DistrictName":"Latehar","StateId":16}, | |
{"DistrictId":244,"DistrictName":"Lohardaga","StateId":16}, | |
{"DistrictId":245,"DistrictName":"Pakur","StateId":16}, | |
{"DistrictId":246,"DistrictName":"Palamu","StateId":16}, | |
{"DistrictId":247,"DistrictName":"Ramgarh","StateId":16}, | |
{"DistrictId":248,"DistrictName":"Ranchi","StateId":16}, | |
{"DistrictId":249,"DistrictName":"Sahibganj","StateId":16}, | |
{"DistrictId":250,"DistrictName":"Seraikela-Kharsawan","StateId":16}, | |
{"DistrictId":251,"DistrictName":"Simdega","StateId":16}, | |
{"DistrictId":252,"DistrictName":"West Singhbhum","StateId":16}, | |
{"DistrictId":253,"DistrictName":"Bagalkot","StateId":17}, | |
{"DistrictId":254,"DistrictName":"Bangalore Rural","StateId":17}, | |
{"DistrictId":255,"DistrictName":"Bangalore Urban","StateId":17}, | |
{"DistrictId":256,"DistrictName":"Belgaum","StateId":17}, | |
{"DistrictId":257,"DistrictName":"Bellary","StateId":17}, | |
{"DistrictId":258,"DistrictName":"Bidar","StateId":17}, | |
{"DistrictId":259,"DistrictName":"Bijapur","StateId":17}, | |
{"DistrictId":260,"DistrictName":"Chamarajanagar","StateId":17}, | |
{"DistrictId":261,"DistrictName":"Chickmagalur","StateId":17}, | |
{"DistrictId":262,"DistrictName":"Chikballapur","StateId":17}, | |
{"DistrictId":263,"DistrictName":"Chitradurga","StateId":17}, | |
{"DistrictId":264,"DistrictName":"Dakshina Kannada","StateId":17}, | |
{"DistrictId":265,"DistrictName":"Davangere","StateId":17}, | |
{"DistrictId":266,"DistrictName":"Dharwad","StateId":17}, | |
{"DistrictId":267,"DistrictName":"Gadag","StateId":17}, | |
{"DistrictId":268,"DistrictName":"Gulbarga","StateId":17}, | |
{"DistrictId":269,"DistrictName":"Hassan","StateId":17}, | |
{"DistrictId":270,"DistrictName":"Haveri","StateId":17}, | |
{"DistrictId":271,"DistrictName":"Kodagu","StateId":17}, | |
{"DistrictId":272,"DistrictName":"Kolar","StateId":17}, | |
{"DistrictId":273,"DistrictName":"Koppal","StateId":17}, | |
{"DistrictId":274,"DistrictName":"Mandya","StateId":17}, | |
{"DistrictId":275,"DistrictName":"Mysore","StateId":17}, | |
{"DistrictId":276,"DistrictName":"Raichur","StateId":17}, | |
{"DistrictId":277,"DistrictName":"Ramnagara","StateId":17}, | |
{"DistrictId":278,"DistrictName":"Shimoga","StateId":17}, | |
{"DistrictId":279,"DistrictName":"Tumkur","StateId":17}, | |
{"DistrictId":280,"DistrictName":"Udupi","StateId":17}, | |
{"DistrictId":281,"DistrictName":"Uttara Kannada (Karwar)","StateId":17}, | |
{"DistrictId":282,"DistrictName":"Yadgir","StateId":17}, | |
{"DistrictId":283,"DistrictName":"Alappuzha","StateId":18}, | |
{"DistrictId":284,"DistrictName":"Ernakulam","StateId":18}, | |
{"DistrictId":285,"DistrictName":"Idukki","StateId":18}, | |
{"DistrictId":286,"DistrictName":"Kannur","StateId":18}, | |
{"DistrictId":287,"DistrictName":"Kasaragod","StateId":18}, | |
{"DistrictId":288,"DistrictName":"Kollam","StateId":18}, | |
{"DistrictId":289,"DistrictName":"Kottayam","StateId":18}, | |
{"DistrictId":290,"DistrictName":"Kozhikode","StateId":18}, | |
{"DistrictId":291,"DistrictName":"Malappuram","StateId":18}, | |
{"DistrictId":292,"DistrictName":"Palakkad","StateId":18}, | |
{"DistrictId":293,"DistrictName":"Pathanamthitta","StateId":18}, | |
{"DistrictId":294,"DistrictName":"Thiruvananthapuram","StateId":18}, | |
{"DistrictId":295,"DistrictName":"Thrissur","StateId":18}, | |
{"DistrictId":296,"DistrictName":"Wayanad","StateId":18}, | |
{"DistrictId":297,"DistrictName":"Lakshadweep","StateId":19}, | |
{"DistrictId":298,"DistrictName":"Alirajpur","StateId":20}, | |
{"DistrictId":299,"DistrictName":"Anuppur","StateId":20}, | |
{"DistrictId":300,"DistrictName":"Ashoknagar","StateId":20}, | |
{"DistrictId":301,"DistrictName":"Balaghat","StateId":20}, | |
{"DistrictId":302,"DistrictName":"Barwani","StateId":20}, | |
{"DistrictId":303,"DistrictName":"Betul","StateId":20}, | |
{"DistrictId":304,"DistrictName":"Bhind","StateId":20}, | |
{"DistrictId":305,"DistrictName":"Bhopal","StateId":20}, | |
{"DistrictId":306,"DistrictName":"Burhanpur","StateId":20}, | |
{"DistrictId":307,"DistrictName":"Chhatarpur","StateId":20}, | |
{"DistrictId":308,"DistrictName":"Chhindwara","StateId":20}, | |
{"DistrictId":309,"DistrictName":"Damoh","StateId":20}, | |
{"DistrictId":310,"DistrictName":"Datia","StateId":20}, | |
{"DistrictId":311,"DistrictName":"Dewas","StateId":20}, | |
{"DistrictId":312,"DistrictName":"Dhar","StateId":20}, | |
{"DistrictId":313,"DistrictName":"Dindori","StateId":20}, | |
{"DistrictId":314,"DistrictName":"Guna","StateId":20}, | |
{"DistrictId":315,"DistrictName":"Gwalior","StateId":20}, | |
{"DistrictId":316,"DistrictName":"Harda","StateId":20}, | |
{"DistrictId":317,"DistrictName":"Hoshangabad","StateId":20}, | |
{"DistrictId":318,"DistrictName":"Indore","StateId":20}, | |
{"DistrictId":319,"DistrictName":"Jabalpur","StateId":20}, | |
{"DistrictId":320,"DistrictName":"Jhabua","StateId":20}, | |
{"DistrictId":321,"DistrictName":"Katni","StateId":20}, | |
{"DistrictId":322,"DistrictName":"Khandwa","StateId":20}, | |
{"DistrictId":323,"DistrictName":"Khargone","StateId":20}, | |
{"DistrictId":324,"DistrictName":"Mandla","StateId":20}, | |
{"DistrictId":325,"DistrictName":"Mandsaur","StateId":20}, | |
{"DistrictId":326,"DistrictName":"Morena","StateId":20}, | |
{"DistrictId":327,"DistrictName":"Narsinghpur","StateId":20}, | |
{"DistrictId":328,"DistrictName":"Neemuch","StateId":20}, | |
{"DistrictId":329,"DistrictName":"Panna","StateId":20}, | |
{"DistrictId":330,"DistrictName":"Raisen","StateId":20}, | |
{"DistrictId":331,"DistrictName":"Rajgarh","StateId":20}, | |
{"DistrictId":332,"DistrictName":"Ratlam","StateId":20}, | |
{"DistrictId":333,"DistrictName":"Rewa","StateId":20}, | |
{"DistrictId":334,"DistrictName":"Sagar","StateId":20}, | |
{"DistrictId":335,"DistrictName":"Satna","StateId":20}, | |
{"DistrictId":336,"DistrictName":"Sehore","StateId":20}, | |
{"DistrictId":337,"DistrictName":"Seoni","StateId":20}, | |
{"DistrictId":338,"DistrictName":"Shahdol","StateId":20}, | |
{"DistrictId":339,"DistrictName":"Shajapur","StateId":20}, | |
{"DistrictId":340,"DistrictName":"Sheopur","StateId":20}, | |
{"DistrictId":341,"DistrictName":"Shivpuri","StateId":20}, | |
{"DistrictId":342,"DistrictName":"Sidhi","StateId":20}, | |
{"DistrictId":343,"DistrictName":"Singrauli","StateId":20}, | |
{"DistrictId":344,"DistrictName":"Tikamgarh","StateId":20}, | |
{"DistrictId":345,"DistrictName":"Ujjain","StateId":20}, | |
{"DistrictId":346,"DistrictName":"Umaria","StateId":20}, | |
{"DistrictId":347,"DistrictName":"Vidisha","StateId":20}, | |
{"DistrictId":348,"DistrictName":"Ahmednagar","StateId":21}, | |
{"DistrictId":349,"DistrictName":"Akola","StateId":21}, | |
{"DistrictId":350,"DistrictName":"Amravati","StateId":21}, | |
{"DistrictId":351,"DistrictName":"Aurangabad","StateId":21}, | |
{"DistrictId":352,"DistrictName":"Beed","StateId":21}, | |
{"DistrictId":353,"DistrictName":"Bhandara","StateId":21}, | |
{"DistrictId":354,"DistrictName":"Buldhana","StateId":21}, | |
{"DistrictId":355,"DistrictName":"Chandrapur","StateId":21}, | |
{"DistrictId":356,"DistrictName":"Dhule","StateId":21}, | |
{"DistrictId":357,"DistrictName":"Gadchiroli","StateId":21}, | |
{"DistrictId":358,"DistrictName":"Gondia","StateId":21}, | |
{"DistrictId":359,"DistrictName":"Hingoli","StateId":21}, | |
{"DistrictId":360,"DistrictName":"Jalgaon","StateId":21}, | |
{"DistrictId":361,"DistrictName":"Jalna","StateId":21}, | |
{"DistrictId":362,"DistrictName":"Kolhapur","StateId":21}, | |
{"DistrictId":363,"DistrictName":"Latur","StateId":21}, | |
{"DistrictId":364,"DistrictName":"Mumbai City","StateId":21}, | |
{"DistrictId":365,"DistrictName":"Mumbai Suburban","StateId":21}, | |
{"DistrictId":366,"DistrictName":"Nagpur","StateId":21}, | |
{"DistrictId":367,"DistrictName":"Nanded","StateId":21}, | |
{"DistrictId":368,"DistrictName":"Nandurbar","StateId":21}, | |
{"DistrictId":369,"DistrictName":"Nashik","StateId":21}, | |
{"DistrictId":370,"DistrictName":"Osmanabad","StateId":21}, | |
{"DistrictId":371,"DistrictName":"Parbhani","StateId":21}, | |
{"DistrictId":372,"DistrictName":"Pune","StateId":21}, | |
{"DistrictId":373,"DistrictName":"Raigad","StateId":21}, | |
{"DistrictId":374,"DistrictName":"Ratnagiri","StateId":21}, | |
{"DistrictId":375,"DistrictName":"Sangli","StateId":21}, | |
{"DistrictId":376,"DistrictName":"Satara","StateId":21}, | |
{"DistrictId":377,"DistrictName":"Sindhudurg","StateId":21}, | |
{"DistrictId":378,"DistrictName":"Solapur","StateId":21}, | |
{"DistrictId":379,"DistrictName":"Thane","StateId":21}, | |
{"DistrictId":380,"DistrictName":"Wardha","StateId":21}, | |
{"DistrictId":381,"DistrictName":"Washim","StateId":21}, | |
{"DistrictId":382,"DistrictName":"Yavatmal","StateId":21}, | |
{"DistrictId":383,"DistrictName":"Bishnupur","StateId":22}, | |
{"DistrictId":384,"DistrictName":"Chandel","StateId":22}, | |
{"DistrictId":385,"DistrictName":"Churachandpur","StateId":22}, | |
{"DistrictId":386,"DistrictName":"Imphal East","StateId":22}, | |
{"DistrictId":387,"DistrictName":"Imphal West","StateId":22}, | |
{"DistrictId":388,"DistrictName":"Senapati","StateId":22}, | |
{"DistrictId":389,"DistrictName":"Tamenglong","StateId":22}, | |
{"DistrictId":390,"DistrictName":"Thoubal","StateId":22}, | |
{"DistrictId":391,"DistrictName":"Ukhrul","StateId":22}, | |
{"DistrictId":392,"DistrictName":"East Garo Hills","StateId":23}, | |
{"DistrictId":393,"DistrictName":"East Jaintia Hills","StateId":23}, | |
{"DistrictId":394,"DistrictName":"East Khasi Hills","StateId":23}, | |
{"DistrictId":395,"DistrictName":"North Garo Hills","StateId":23}, | |
{"DistrictId":396,"DistrictName":"Ri Bhoi","StateId":23}, | |
{"DistrictId":397,"DistrictName":"South Garo Hills","StateId":23}, | |
{"DistrictId":398,"DistrictName":"South West Garo Hills","StateId":23}, | |
{"DistrictId":399,"DistrictName":"South West Khasi Hills","StateId":23}, | |
{"DistrictId":400,"DistrictName":"West Garo Hills","StateId":23}, | |
{"DistrictId":401,"DistrictName":"West Jaintia Hills","StateId":23}, | |
{"DistrictId":402,"DistrictName":"West Khasi Hills","StateId":23}, | |
{"DistrictId":403,"DistrictName":"Aizawl","StateId":24}, | |
{"DistrictId":404,"DistrictName":"Champhai","StateId":24}, | |
{"DistrictId":405,"DistrictName":"Kolasib","StateId":24}, | |
{"DistrictId":406,"DistrictName":"Lawngtlai","StateId":24}, | |
{"DistrictId":407,"DistrictName":"Lunglei","StateId":24}, | |
{"DistrictId":408,"DistrictName":"Mamit","StateId":24}, | |
{"DistrictId":409,"DistrictName":"Saiha","StateId":24}, | |
{"DistrictId":410,"DistrictName":"Serchhip","StateId":24}, | |
{"DistrictId":411,"DistrictName":"Dimapur","StateId":25}, | |
{"DistrictId":412,"DistrictName":"Kiphire","StateId":25}, | |
{"DistrictId":413,"DistrictName":"Kohima","StateId":25}, | |
{"DistrictId":414,"DistrictName":"Longleng","StateId":25}, | |
{"DistrictId":415,"DistrictName":"Mokokchung","StateId":25}, | |
{"DistrictId":416,"DistrictName":"Mon","StateId":25}, | |
{"DistrictId":417,"DistrictName":"Peren","StateId":25}, | |
{"DistrictId":418,"DistrictName":"Phek","StateId":25}, | |
{"DistrictId":419,"DistrictName":"Tuensang","StateId":25}, | |
{"DistrictId":420,"DistrictName":"Wokha","StateId":25}, | |
{"DistrictId":421,"DistrictName":"Zunheboto","StateId":25}, | |
{"DistrictId":422,"DistrictName":"Angul","StateId":26}, | |
{"DistrictId":423,"DistrictName":"Balangir","StateId":26}, | |
{"DistrictId":424,"DistrictName":"Balasore","StateId":26}, | |
{"DistrictId":425,"DistrictName":"Bargarh","StateId":26}, | |
{"DistrictId":426,"DistrictName":"Bhadrak","StateId":26}, | |
{"DistrictId":427,"DistrictName":"Boudh","StateId":26}, | |
{"DistrictId":428,"DistrictName":"Cuttack","StateId":26}, | |
{"DistrictId":429,"DistrictName":"Deogarh","StateId":26}, | |
{"DistrictId":430,"DistrictName":"Dhenkanal","StateId":26}, | |
{"DistrictId":431,"DistrictName":"Gajapati","StateId":26}, | |
{"DistrictId":432,"DistrictName":"Ganjam","StateId":26}, | |
{"DistrictId":433,"DistrictName":"Jagatsinghapur","StateId":26}, | |
{"DistrictId":434,"DistrictName":"Jajpur","StateId":26}, | |
{"DistrictId":435,"DistrictName":"Jharsuguda","StateId":26}, | |
{"DistrictId":436,"DistrictName":"Kalahandi","StateId":26}, | |
{"DistrictId":437,"DistrictName":"Kandhamal","StateId":26}, | |
{"DistrictId":438,"DistrictName":"Kendrapara","StateId":26}, | |
{"DistrictId":439,"DistrictName":"Kendujhar (Keonjhar)","StateId":26}, | |
{"DistrictId":440,"DistrictName":"Khordha","StateId":26}, | |
{"DistrictId":441,"DistrictName":"Koraput","StateId":26}, | |
{"DistrictId":442,"DistrictName":"Malkangiri","StateId":26}, | |
{"DistrictId":443,"DistrictName":"Mayurbhanj","StateId":26}, | |
{"DistrictId":444,"DistrictName":"Nabarangpur","StateId":26}, | |
{"DistrictId":445,"DistrictName":"Nayagarh","StateId":26}, | |
{"DistrictId":446,"DistrictName":"Nuapada","StateId":26}, | |
{"DistrictId":447,"DistrictName":"Puri","StateId":26}, | |
{"DistrictId":448,"DistrictName":"Rayagada","StateId":26}, | |
{"DistrictId":449,"DistrictName":"Sambalpur","StateId":26}, | |
{"DistrictId":450,"DistrictName":"Sonepur","StateId":26}, | |
{"DistrictId":451,"DistrictName":"Sundargarh","StateId":26}, | |
{"DistrictId":452,"DistrictName":"Karaikal","StateId":27}, | |
{"DistrictId":453,"DistrictName":"Mahe","StateId":27}, | |
{"DistrictId":454,"DistrictName":"Pondicherry","StateId":27}, | |
{"DistrictId":455,"DistrictName":"Yanam","StateId":27}, | |
{"DistrictId":456,"DistrictName":"Amritsar","StateId":28}, | |
{"DistrictId":457,"DistrictName":"Barnala","StateId":28}, | |
{"DistrictId":458,"DistrictName":"Bathinda","StateId":28}, | |
{"DistrictId":459,"DistrictName":"Faridkot","StateId":28}, | |
{"DistrictId":460,"DistrictName":"Fatehgarh Sahib","StateId":28}, | |
{"DistrictId":461,"DistrictName":"Fazilka","StateId":28}, | |
{"DistrictId":462,"DistrictName":"Ferozepur","StateId":28}, | |
{"DistrictId":463,"DistrictName":"Gurdaspur","StateId":28}, | |
{"DistrictId":464,"DistrictName":"Hoshiarpur","StateId":28}, | |
{"DistrictId":465,"DistrictName":"Jalandhar","StateId":28}, | |
{"DistrictId":466,"DistrictName":"Kapurthala","StateId":28}, | |
{"DistrictId":467,"DistrictName":"Ludhiana","StateId":28}, | |
{"DistrictId":468,"DistrictName":"Mansa","StateId":28}, | |
{"DistrictId":469,"DistrictName":"Moga","StateId":28}, | |
{"DistrictId":470,"DistrictName":"Muktsar","StateId":28}, | |
{"DistrictId":471,"DistrictName":"Nawanshahr","StateId":28}, | |
{"DistrictId":472,"DistrictName":"Pathankot","StateId":28}, | |
{"DistrictId":473,"DistrictName":"Patiala","StateId":28}, | |
{"DistrictId":474,"DistrictName":"Rupnagar","StateId":28}, | |
{"DistrictId":475,"DistrictName":"Sangrur","StateId":28}, | |
{"DistrictId":476,"DistrictName":"SAS Nagar (Mohali)","StateId":28}, | |
{"DistrictId":477,"DistrictName":"Tarn Taran","StateId":28}, | |
{"DistrictId":478,"DistrictName":"Ajmer","StateId":29}, | |
{"DistrictId":479,"DistrictName":"Alwar","StateId":29}, | |
{"DistrictId":480,"DistrictName":"Banswara","StateId":29}, | |
{"DistrictId":481,"DistrictName":"Baran","StateId":29}, | |
{"DistrictId":482,"DistrictName":"Barmer","StateId":29}, | |
{"DistrictId":483,"DistrictName":"Bharatpur","StateId":29}, | |
{"DistrictId":484,"DistrictName":"Bhilwara","StateId":29}, | |
{"DistrictId":485,"DistrictName":"Bikaner","StateId":29}, | |
{"DistrictId":486,"DistrictName":"Bundi","StateId":29}, | |
{"DistrictId":487,"DistrictName":"Chittorgarh","StateId":29}, | |
{"DistrictId":488,"DistrictName":"Churu","StateId":29}, | |
{"DistrictId":489,"DistrictName":"Dausa","StateId":29}, | |
{"DistrictId":490,"DistrictName":"Dholpur","StateId":29}, | |
{"DistrictId":491,"DistrictName":"Dungarpur","StateId":29}, | |
{"DistrictId":492,"DistrictName":"Hanumangarh","StateId":29}, | |
{"DistrictId":493,"DistrictName":"Jaipur","StateId":29}, | |
{"DistrictId":494,"DistrictName":"Jaisalmer","StateId":29}, | |
{"DistrictId":495,"DistrictName":"Jalore","StateId":29}, | |
{"DistrictId":496,"DistrictName":"Jhalawar","StateId":29}, | |
{"DistrictId":497,"DistrictName":"Jhunjhunu","StateId":29}, | |
{"DistrictId":498,"DistrictName":"Jodhpur","StateId":29}, | |
{"DistrictId":499,"DistrictName":"Karauli","StateId":29}, | |
{"DistrictId":500,"DistrictName":"Kota","StateId":29}, | |
{"DistrictId":501,"DistrictName":"Nagaur","StateId":29}, | |
{"DistrictId":502,"DistrictName":"Pali","StateId":29}, | |
{"DistrictId":503,"DistrictName":"Pratapgarh","StateId":29}, | |
{"DistrictId":504,"DistrictName":"Rajsamand","StateId":29}, | |
{"DistrictId":505,"DistrictName":"Sawai Madhopur","StateId":29}, | |
{"DistrictId":506,"DistrictName":"Sikar","StateId":29}, | |
{"DistrictId":507,"DistrictName":"Sirohi","StateId":29}, | |
{"DistrictId":508,"DistrictName":"Sri Ganganagar","StateId":29}, | |
{"DistrictId":509,"DistrictName":"Tonk","StateId":29}, | |
{"DistrictId":510,"DistrictName":"Udaipur","StateId":29}, | |
{"DistrictId":511,"DistrictName":"East Sikkim","StateId":30}, | |
{"DistrictId":512,"DistrictName":"North Sikkim","StateId":30}, | |
{"DistrictId":513,"DistrictName":"South Sikkim","StateId":30}, | |
{"DistrictId":514,"DistrictName":"West Sikkim","StateId":30}, | |
{"DistrictId":515,"DistrictName":"Ariyalur","StateId":31}, | |
{"DistrictId":516,"DistrictName":"Chennai","StateId":31}, | |
{"DistrictId":517,"DistrictName":"Coimbatore","StateId":31}, | |
{"DistrictId":518,"DistrictName":"Cuddalore","StateId":31}, | |
{"DistrictId":519,"DistrictName":"Dharmapuri","StateId":31}, | |
{"DistrictId":520,"DistrictName":"Dindigul","StateId":31}, | |
{"DistrictId":521,"DistrictName":"Erode","StateId":31}, | |
{"DistrictId":522,"DistrictName":"Kanchipuram","StateId":31}, | |
{"DistrictId":523,"DistrictName":"Kanyakumari","StateId":31}, | |
{"DistrictId":524,"DistrictName":"Karur","StateId":31}, | |
{"DistrictId":525,"DistrictName":"Krishnagiri","StateId":31}, | |
{"DistrictId":526,"DistrictName":"Madurai","StateId":31}, | |
{"DistrictId":527,"DistrictName":"Nagapattinam","StateId":31}, | |
{"DistrictId":528,"DistrictName":"Namakkal","StateId":31}, | |
{"DistrictId":529,"DistrictName":"Nilgiris","StateId":31}, | |
{"DistrictId":530,"DistrictName":"Perambalur","StateId":31}, | |
{"DistrictId":531,"DistrictName":"Pudukkottai","StateId":31}, | |
{"DistrictId":532,"DistrictName":"Ramanathapuram","StateId":31}, | |
{"DistrictId":533,"DistrictName":"Salem","StateId":31}, | |
{"DistrictId":534,"DistrictName":"Sivaganga","StateId":31}, | |
{"DistrictId":535,"DistrictName":"Thanjavur","StateId":31}, | |
{"DistrictId":536,"DistrictName":"Theni","StateId":31}, | |
{"DistrictId":537,"DistrictName":"Thoothukudi (Tuticorin)","StateId":31}, | |
{"DistrictId":538,"DistrictName":"Tiruchirappalli","StateId":31}, | |
{"DistrictId":539,"DistrictName":"Tirunelveli","StateId":31}, | |
{"DistrictId":540,"DistrictName":"Tiruppur","StateId":31}, | |
{"DistrictId":541,"DistrictName":"Tiruvallur","StateId":31}, | |
{"DistrictId":542,"DistrictName":"Tiruvannamalai","StateId":31}, | |
{"DistrictId":543,"DistrictName":"Tiruvarur","StateId":31}, | |
{"DistrictId":544,"DistrictName":"Vellore","StateId":31}, | |
{"DistrictId":545,"DistrictName":"Viluppuram","StateId":31}, | |
{"DistrictId":546,"DistrictName":"Virudhunagar","StateId":31}, | |
{"DistrictId":547,"DistrictName":"Adilabad","StateId":32}, | |
{"DistrictId":548,"DistrictName":"Hyderabad","StateId":32}, | |
{"DistrictId":549,"DistrictName":"Karimnagar","StateId":32}, | |
{"DistrictId":550,"DistrictName":"Khammam","StateId":32}, | |
{"DistrictId":551,"DistrictName":"Mahabubnagar","StateId":32}, | |
{"DistrictId":552,"DistrictName":"Medak","StateId":32}, | |
{"DistrictId":553,"DistrictName":"Nalgonda","StateId":32}, | |
{"DistrictId":554,"DistrictName":"Nizamabad","StateId":32}, | |
{"DistrictId":555,"DistrictName":"Rangareddy","StateId":32}, | |
{"DistrictId":556,"DistrictName":"Warangal","StateId":32}, | |
{"DistrictId":557,"DistrictName":"Dhalai","StateId":33}, | |
{"DistrictId":558,"DistrictName":"Gomati","StateId":33}, | |
{"DistrictId":559,"DistrictName":"Khowai","StateId":33}, | |
{"DistrictId":560,"DistrictName":"North Tripura","StateId":33}, | |
{"DistrictId":561,"DistrictName":"Sepahijala","StateId":33}, | |
{"DistrictId":562,"DistrictName":"South Tripura","StateId":33}, | |
{"DistrictId":563,"DistrictName":"Unakoti","StateId":33}, | |
{"DistrictId":564,"DistrictName":"West Tripura","StateId":33}, | |
{"DistrictId":565,"DistrictName":"Agra","StateId":34}, | |
{"DistrictId":566,"DistrictName":"Aligarh","StateId":34}, | |
{"DistrictId":567,"DistrictName":"Allahabad","StateId":34}, | |
{"DistrictId":568,"DistrictName":"Ambedkar Nagar","StateId":34}, | |
{"DistrictId":569,"DistrictName":"Auraiya","StateId":34}, | |
{"DistrictId":570,"DistrictName":"Azamgarh","StateId":34}, | |
{"DistrictId":571,"DistrictName":"Baghpat","StateId":34}, | |
{"DistrictId":572,"DistrictName":"Bahraich","StateId":34}, | |
{"DistrictId":573,"DistrictName":"Ballia","StateId":34}, | |
{"DistrictId":574,"DistrictName":"Balrampur","StateId":34}, | |
{"DistrictId":575,"DistrictName":"Banda","StateId":34}, | |
{"DistrictId":576,"DistrictName":"Barabanki","StateId":34}, | |
{"DistrictId":577,"DistrictName":"Bareilly","StateId":34}, | |
{"DistrictId":578,"DistrictName":"Basti","StateId":34}, | |
{"DistrictId":579,"DistrictName":"Sambhal (Bhim Nagar)","StateId":34}, | |
{"DistrictId":580,"DistrictName":"Bijnor","StateId":34}, | |
{"DistrictId":581,"DistrictName":"Budaun","StateId":34}, | |
{"DistrictId":582,"DistrictName":"Bulandshahr","StateId":34}, | |
{"DistrictId":583,"DistrictName":"Chandauli","StateId":34}, | |
{"DistrictId":584,"DistrictName":"Amethi (Chatrapati Sahuji Mahraj Nagar)","StateId":34}, | |
{"DistrictId":585,"DistrictName":"Chitrakoot","StateId":34}, | |
{"DistrictId":586,"DistrictName":"Deoria","StateId":34}, | |
{"DistrictId":587,"DistrictName":"Etah","StateId":34}, | |
{"DistrictId":588,"DistrictName":"Etawah","StateId":34}, | |
{"DistrictId":589,"DistrictName":"Faizabad","StateId":34}, | |
{"DistrictId":590,"DistrictName":"Farrukhabad","StateId":34}, | |
{"DistrictId":591,"DistrictName":"Fatehpur","StateId":34}, | |
{"DistrictId":592,"DistrictName":"Firozabad","StateId":34}, | |
{"DistrictId":593,"DistrictName":"Gautam Buddha Nagar","StateId":34}, | |
{"DistrictId":594,"DistrictName":"Ghaziabad","StateId":34}, | |
{"DistrictId":595,"DistrictName":"Ghazipur","StateId":34}, | |
{"DistrictId":596,"DistrictName":"Gonda","StateId":34}, | |
{"DistrictId":597,"DistrictName":"Gorakhpur","StateId":34}, | |
{"DistrictId":598,"DistrictName":"Hamirpur","StateId":34}, | |
{"DistrictId":599,"DistrictName":"Hardoi","StateId":34}, | |
{"DistrictId":600,"DistrictName":"Hathras","StateId":34}, | |
{"DistrictId":601,"DistrictName":"Jalaun","StateId":34}, | |
{"DistrictId":602,"DistrictName":"Jaunpur","StateId":34}, | |
{"DistrictId":603,"DistrictName":"Jhansi","StateId":34}, | |
{"DistrictId":604,"DistrictName":"Amroha (J.P. Nagar)","StateId":34}, | |
{"DistrictId":605,"DistrictName":"Kannauj","StateId":34}, | |
{"DistrictId":606,"DistrictName":"Kanpur Dehat","StateId":34}, | |
{"DistrictId":607,"DistrictName":"Kanpur Nagar","StateId":34}, | |
{"DistrictId":608,"DistrictName":"Kanshiram Nagar (Kasganj)","StateId":34}, | |
{"DistrictId":609,"DistrictName":"Kaushambi","StateId":34}, | |
{"DistrictId":610,"DistrictName":"Kushinagar (Padrauna)","StateId":34}, | |
{"DistrictId":611,"DistrictName":"Lakhimpur - Kheri","StateId":34}, | |
{"DistrictId":612,"DistrictName":"Lalitpur","StateId":34}, | |
{"DistrictId":613,"DistrictName":"Lucknow","StateId":34}, | |
{"DistrictId":614,"DistrictName":"Maharajganj","StateId":34}, | |
{"DistrictId":615,"DistrictName":"Mahoba","StateId":34}, | |
{"DistrictId":616,"DistrictName":"Mainpuri","StateId":34}, | |
{"DistrictId":617,"DistrictName":"Mathura","StateId":34}, | |
{"DistrictId":618,"DistrictName":"Mau","StateId":34}, | |
{"DistrictId":619,"DistrictName":"Meerut","StateId":34}, | |
{"DistrictId":620,"DistrictName":"Mirzapur","StateId":34}, | |
{"DistrictId":621,"DistrictName":"Moradabad","StateId":34}, | |
{"DistrictId":622,"DistrictName":"Muzaffarnagar","StateId":34}, | |
{"DistrictId":623,"DistrictName":"Hapur (Panchsheel Nagar)","StateId":34}, | |
{"DistrictId":624,"DistrictName":"Pilibhit","StateId":34}, | |
{"DistrictId":625,"DistrictName":"Shamali (Prabuddh Nagar)","StateId":34}, | |
{"DistrictId":626,"DistrictName":"Pratapgarh","StateId":34}, | |
{"DistrictId":627,"DistrictName":"RaeBareli","StateId":34}, | |
{"DistrictId":628,"DistrictName":"Rampur","StateId":34}, | |
{"DistrictId":629,"DistrictName":"Saharanpur","StateId":34}, | |
{"DistrictId":630,"DistrictName":"Sant Kabir Nagar","StateId":34}, | |
{"DistrictId":631,"DistrictName":"Sant Ravidas Nagar","StateId":34}, | |
{"DistrictId":632,"DistrictName":"Shahjahanpur","StateId":34}, | |
{"DistrictId":633,"DistrictName":"Shravasti","StateId":34}, | |
{"DistrictId":634,"DistrictName":"Siddharth Nagar","StateId":34}, | |
{"DistrictId":635,"DistrictName":"Sitapur","StateId":34}, | |
{"DistrictId":636,"DistrictName":"Sonbhadra","StateId":34}, | |
{"DistrictId":637,"DistrictName":"Sultanpur","StateId":34}, | |
{"DistrictId":638,"DistrictName":"Unnao","StateId":34}, | |
{"DistrictId":639,"DistrictName":"Varanasi","StateId":34}, | |
{"DistrictId":640,"DistrictName":"Almora","StateId":35}, | |
{"DistrictId":641,"DistrictName":"Bageshwar","StateId":35}, | |
{"DistrictId":642,"DistrictName":"Chamoli","StateId":35}, | |
{"DistrictId":643,"DistrictName":"Champawat","StateId":35}, | |
{"DistrictId":644,"DistrictName":"Dehradun","StateId":35}, | |
{"DistrictId":645,"DistrictName":"Haridwar","StateId":35}, | |
{"DistrictId":646,"DistrictName":"Nainital","StateId":35}, | |
{"DistrictId":647,"DistrictName":"Pauri Garhwal","StateId":35}, | |
{"DistrictId":648,"DistrictName":"Pithoragarh","StateId":35}, | |
{"DistrictId":649,"DistrictName":"Rudraprayag","StateId":35}, | |
{"DistrictId":650,"DistrictName":"Tehri Garhwal","StateId":35}, | |
{"DistrictId":651,"DistrictName":"Udham Singh Nagar","StateId":35}, | |
{"DistrictId":652,"DistrictName":"Uttarkashi","StateId":35}, | |
{"DistrictId":653,"DistrictName":"Bankura","StateId":36}, | |
{"DistrictId":654,"DistrictName":"Birbhum","StateId":36}, | |
{"DistrictId":655,"DistrictName":"Burdwan (Bardhaman)","StateId":36}, | |
{"DistrictId":656,"DistrictName":"Cooch Behar","StateId":36}, | |
{"DistrictId":657,"DistrictName":"Dakshin Dinajpur (South Dinajpur)","StateId":36}, | |
{"DistrictId":658,"DistrictName":"Darjeeling","StateId":36}, | |
{"DistrictId":659,"DistrictName":"Hooghly","StateId":36}, | |
{"DistrictId":660,"DistrictName":"Howrah","StateId":36}, | |
{"DistrictId":661,"DistrictName":"Jalpaiguri","StateId":36}, | |
{"DistrictId":662,"DistrictName":"Kolkata","StateId":36}, | |
{"DistrictId":663,"DistrictName":"Malda","StateId":36}, | |
{"DistrictId":664,"DistrictName":"Murshidabad","StateId":36}, | |
{"DistrictId":665,"DistrictName":"Nadia","StateId":36}, | |
{"DistrictId":666,"DistrictName":"North 24 Parganas","StateId":36}, | |
{"DistrictId":667,"DistrictName":"Paschim Medinipur (West Medinipur)","StateId":36}, | |
{"DistrictId":668,"DistrictName":"Purba Medinipur (East Medinipur)","StateId":36}, | |
{"DistrictId":669,"DistrictName":"Purulia","StateId":36}, | |
{"DistrictId":670,"DistrictName":"South 24 Parganas","StateId":36}, | |
{"DistrictId":671,"DistrictName":"Uttar Dinajpur (North Dinajpur)","StateId":36}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parse the phone number for country code and number. | |
func parse(_ phoneNumber: String, with: [String], completion: ([String]) -> ()) { | |
var index = 0 | |
for code in with { | |
if let range = phoneNumber.range(of: code) { | |
// let startPos = mystring.distance(from: mystring.startIndex, to: range.lowerBound) | |
let endPos = phoneNumber.distance(from: phoneNumber.startIndex, to: range.upperBound) | |
index = endPos.hashValue | |
} | |
} | |
let phoneNumer = phoneNumber.index(phoneNumber.startIndex, offsetBy: index) | |
let code = phoneNumber.substring(to: phoneNumer) | |
let number = phoneNumber.substring(from: phoneNumer) | |
completion([code, number]) | |
} | |
// MARK:- This method will read the country codes from the json file. | |
func getCountryCode() -> [CountryCode] { | |
var arr = [CountryCode]() | |
if let path = Bundle.main.path(forResource: "CountryCodes", ofType: "json") { | |
do { | |
let data = try Data(contentsOf: URL(fileURLWithPath: path), options: Data.ReadingOptions.mappedIfSafe) | |
let jsonObj = JSON(data: data) | |
if jsonObj != JSON.null { | |
for item in jsonObj { | |
let country = item.1["name"].string ?? "" | |
let dial_code = item.1["dial_code"].string ?? "" | |
let image = item.1["code"].string ?? "" | |
arr.append(CountryCode(country: country, code: dial_code, image: "\(image).png")) | |
} | |
return arr | |
} | |
} catch { | |
print("could not get json from file, make sure that file contains valid json.") | |
} | |
} else { | |
print("Invalid filename/path.") | |
} | |
return arr | |
} | |
// MARK:- Usage | |
let countries = getCountryCode() | |
var areaCode = [String]() | |
for item in countries { | |
let code = item.code | |
areaCode.append(code) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"StateId":1,"StateName":"Andaman and Nicobar Island","CountryId":1}, | |
{"StateId":2,"StateName":"Andhra Pradesh","CountryId":1}, | |
{"StateId":3,"StateName":"Arunachal Pradesh","CountryId":1}, | |
{"StateId":4,"StateName":"Assam","CountryId":1}, | |
{"StateId":5,"StateName":"Bihar","CountryId":1}, | |
{"StateId":6,"StateName":"Chandigarh","CountryId":1}, | |
{"StateId":7,"StateName":"Chhattisgarh","CountryId":1}, | |
{"StateId":8,"StateName":"Dadra and Nagar Haveli","CountryId":1}, | |
{"StateId":9,"StateName":"Daman and Diu","CountryId":1}, | |
{"StateId":10,"StateName":"Delhi","CountryId":1}, | |
{"StateId":11,"StateName":"Goa","CountryId":1}, | |
{"StateId":12,"StateName":"Gujarat","CountryId":1}, | |
{"StateId":13,"StateName":"Haryana","CountryId":1}, | |
{"StateId":14,"StateName":"Himachal Pradesh","CountryId":1}, | |
{"StateId":15,"StateName":"Jammu and Kashmir","CountryId":1}, | |
{"StateId":16,"StateName":"Jharkhand","CountryId":1}, | |
{"StateId":17,"StateName":"Karnataka","CountryId":1}, | |
{"StateId":18,"StateName":"Kerala","CountryId":1}, | |
{"StateId":19,"StateName":"Lakshadweep","CountryId":1}, | |
{"StateId":20,"StateName":"Madhya Pradesh","CountryId":1}, | |
{"StateId":21,"StateName":"Maharashtra","CountryId":1}, | |
{"StateId":22,"StateName":"Manipur","CountryId":1}, | |
{"StateId":23,"StateName":"Meghalaya","CountryId":1}, | |
{"StateId":24,"StateName":"Mizoram","CountryId":1}, | |
{"StateId":25,"StateName":"Nagaland","CountryId":1}, | |
{"StateId":26,"StateName":"Odisha","CountryId":1}, | |
{"StateId":27,"StateName":"Puducherry","CountryId":1}, | |
{"StateId":28,"StateName":"Punjab","CountryId":1}, | |
{"StateId":29,"StateName":"Rajasthan","CountryId":1}, | |
{"StateId":30,"StateName":"Sikkim","CountryId":1}, | |
{"StateId":31,"StateName":"Tamil Nadu","CountryId":1}, | |
{"StateId":32,"StateName":"Telangana","CountryId":1}, | |
{"StateId":33,"StateName":"Tripura","CountryId":1}, | |
{"StateId":34,"StateName":"Uttar Pradesh","CountryId":1}, | |
{"StateId":35,"StateName":"Uttarakhand","CountryId":1}, | |
{"StateId":36,"StateName":"West Bengal","CountryId":1}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment