Skip to content

Instantly share code, notes, and snippets.

@ErAshu
Last active December 19, 2018 11:31
Show Gist options
  • Save ErAshu/8ce4d93bf1fff68e7d67ea12e2138582 to your computer and use it in GitHub Desktop.
Save ErAshu/8ce4d93bf1fff68e7d67ea12e2138582 to your computer and use it in GitHub Desktop.
Get Indian State name, state code and state GST Code in Swift
//
// IndianState.swift
//
// Created by Ashutosh Kumar on 19/12/18.
// Copyright © 2018 AppiKate. All rights reserved.
//
/**
usage:
let indianStates = CountryUtilities.indianState()
*/
import Foundation
import UIKit
struct CountryUtilities {
static func indianState() -> [[String : String]] {
let stateList = [
[ "code": "AN", "name": "Andaman and Nicobar Islands", "GSTCode": "35"],
[ "code": "AP", "name": "Andhra Pradesh", "GSTCode": "37"],
[ "code": "AR", "name": "Arunachal Pradesh", "GSTCode": "12"],
[ "code": "AS", "name": "Assam", "GSTCode": "18"],
[ "code": "BR", "name": "Bihar", "GSTCode": "10" ],
[ "code": "CH", "name": "Chandigarh", "GSTCode": "04" ],
[ "code": "CG", "name": "Chhattisgarh", "GSTCode": "22" ],
[ "code": "DN", "name": "Dadra and Nagar Haveli", "GSTCode": "26" ],
[ "code": "DD", "name": "Daman and Diu", "GSTCode": "25" ],
[ "code": "DL", "name": "Delhi", "GSTCode": "07" ],
[ "code": "GA", "name": "Goa", "GSTCode": "30" ],
[ "code": "GJ", "name": "Gujarat", "GSTCode": "24" ],
[ "code": "HR", "name": "Haryana", "GSTCode": "06" ],
[ "code": "HP", "name": "Himachal Pradesh", "GSTCode": "02" ],
[ "code": "JK", "name": "Jammu and Kashmir", "GSTCode": "01" ],
[ "code": "JH", "name": "Jharkhand", "GSTCode": "20" ],
[ "code": "KA", "name": "Karnataka", "GSTCode": "29" ],
[ "code": "KL", "name": "Kerala", "GSTCode": "32" ],
[ "code": "LD", "name": "Lakshadweep", "GSTCode": "31"],
[ "code": "MP", "name": "Madhya Pradesh", "GSTCode": "23" ],
[ "code": "MH", "name": "Maharashtra", "GSTCode": "27" ],
[ "code": "MN", "name": "Manipur", "GSTCode": "14" ],
[ "code": "ML", "name": "Meghalaya", "GSTCode": "17" ],
[ "code": "MZ", "name": "Mizoram", "GSTCode": "15" ],
[ "code": "NL", "name": "Nagaland", "GSTCode": "13" ],
[ "code": "OR", "name": "Orissa", "GSTCode": "21" ],
[ "code": "PY", "name": "Pondicherry", "GSTCode": "34" ],
[ "code": "PB", "name": "Punjab", "GSTCode": "03" ],
[ "code": "RJ", "name": "Rajasthan", "GSTCode": "08" ],
[ "code": "SK", "name": "Sikkim", "GSTCode": "11" ],
[ "code": "TN", "name": "Tamil Nadu", "GSTCode": "33"],
[ "code": "TS", "name": "Telangana", "GSTCode": "36" ],
[ "code": "TR", "name": "Tripura", "GSTCode": "16"],
[ "code": "UP", "name": "Uttar Pradesh", "GSTCode": "09" ],
[ "code": "UT", "name": "Uttarakhand", "GSTCode": "05" ],
[ "code": "WB", "name": "West Bengal", "GSTCode": "19" ],
]
return stateList
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment