I am a Front end developer and I am working on a project which requires CRUD operations, I came to the point in which I have to fetch data from an API. I tested the API in Postman and Arc, the data is coming out fine as it should (Array of objects), but when I fetch in the app either with Axios or with Fetch the data I get is, Array of Arrays, this never happened and I could use the help.
axios
.get(
"***$format=json",
{ withCredentials: "true" }
)
.then((data) => {
console.log(data, "data");
})
.catch((err) => console.log(err, "err"));
>Solution :
I have seen the consol log and it seems that it is an Array of Object only but the length of the array is 1823 so chrome changed the way of showing, it just made groups of 100 arrays so if you just try to iterate through the response using .map method then you will find out that actually, it is an array of object