Creating cities json api and dealing with it on the client side