I have an API response that returns up to 100 records and if more exist, a pageKey will be returned. That pageKey is then added to the end of the initial request as a new parameter and you can continue looping through responses till no more pageKey exists.
The first call does not require the parameter, but every subsequent call requires it.
I'm struggling to figure out how to loop through the responses. I've attempted using a script through the success event handler, but it becomes an infinite loop.
Any help would be much appreciated.