I need to call the API to get the data. Here is the current implementation.
return $.get(API_URL)
.then(function (response) {
return response.data;
}, function (response) {
return response.data;
});
And when i console log value of the response. Have this.
console.log(response.data);
Output: [object Object]
When I check the Network->Response:
JSON
Data
0: Object
1: Object
Success: True
I need to count the number of object in the response. What should I do?