I looked at similar questions, but none of them helped me. I am going to receive an object like the following:
[
{
\"id\": 1,
\"name\": \"Safa\",
i have the same problem. this is how i fixed the problem. first when the error is occurred, my array data is coming form DB like this --,
{brands: Array(5), _id: "5ae9455f7f7af749cb2d3740"}
make sure that your data is an ARRAY, not an OBJECT that carries an array. only array look like this --,
(5) [{…}, {…}, {…}, {…}, {…}]
it solved my problem.