This module exports two arrays:
- shahr
- ostan
shahrs and ostans are related by id
yarn add iran-cities-json
#or
npm i iran-cities-json
const { shahr, ostan } = require('iran-cities-json');
you can use the ids provided here on ui and backend validation and only store ids in db and don't worry about relations after that.
All of the credits goes to work of ahmadazizi
Make sure to thank him ;)
released based on v2.0 release of ahmadazizi's work
removed numbered duplicate names of cities (ids are intact)