Help with pagination

Options

I tried implementing pagination, but I keep getting this error.

This is how I am setting it up for pagination:

I believe the problem is with setting up the external part as such:

But I am not sure where to put my object to make this work — if this is even the correct way to utilize pagination.

Where am I going wrong?

Tagged:

Best Answer

  • NWold
    NWold Member
    Answer ✓
    Options

    I found a different route. I am using Draftbit as the frontend, so I created a function to set all the created_at variables into relative time stamps.

Answers

  • NWold
    NWold Member
    Options

    After messing with this more, I noticed that the error only appears due to the for loop I have:

    How can I get this to work while still having the for loop, as this helps me to display timestamps

  • Cameron B
    Cameron B Member, Administrator

    ADMIN

    Options

    The error please use a numerically indexed array means that the 'array' we're passing into the loop might not actually be readable as an array itself.

    As you run and debug, in the debugger, when you expand all the variables, what does club_news show us?

    Is this a list of objects as we'd expect, or something else? Thanks!

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    club_news is an object with paging metadata. Iterate over club_news.items to crack this immediate issue.

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    React Native FTW!