Return data from API as JSON