refactored json.data to array