Refactired the structure of json data