salesopsintegra
4 years agoNew Contributor II
URL Pagination, but it's buried within the string
This article is very similar to my question.
I’m in a bit of a different boat though. My pagination is buried as a string within a string within the headers - not entity.
I am able to parse with something like $headers.link.split(“;”)[1]
but this seems brittle.
My GET snap doesn’t like this for a hasNext: $headers.link.contains(‘rel=“next”’)
Okta is also one of my use cases, so I’ve worked this out before. Here is my approach (there are alternatives to the syntax):
For copy/paste…
Has next:$headers.link.contains("\"next\"")
Next URL:$headers.link.replace(/^<(.+)>.+/,"$1")