Keep getting a 'Please use a numerically indexed array' message in debugger

Options

Hi @Michael Udinski,

I am adding data from an external API and have run into the 'Please use a numerically indexed array' issue in the debugger.

I have reviewed the 4 threads on this topic here but still am not able to chase down where the issue is as the debugger does not actually reveal the exact location. I've also followed your video on the REST Countries API and have that call up and running successfully. So I modelled this call after that one but something weird keeps happening.

I first tried using the Values filter on the whole variable 'results we want' but that gave issues with the text values. So then I moved it just to the 'images' value as this is the only one that is coming back as an array from this call. Full video is below.

Detailed Reproduction of Problem: https://share.cleanshot.com/VP6EfX

Data source: https://dummyjson.com/docs/products

Best Answer

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Answer ✓
    Options

    Hey @Vadim Vozmitsel you're getting this error message because loops only work with (numerically indexed) arrays. You are looping through result which is an object.... I suspect you actually want to loop through your products array


Answers