Method to format json data to use in a model