Return JSON data from API in arrays