using resource module

to retrieve data from json and save data in json file