Hello,
I am creating a simple script to grab records from a database using a filter parameter n. I would like to find out how to pre-process a GET filter parameter value such that if n=ABC, the actual request sent will be n=XYZ.
This is because in my table the value of ABC does not exist, only XYZ. So the original request will result in no results found.
I have tried using event.request.payload.resource and event.request.query.n to no avail - I’ve been getting “undefined” errors for hours.
What is the way to grab the value of a filter parameter and change it in pre-process scripts?
Any help will be greatly appreciated!
Cheers
Glen