« Back to full topics list
0
0

Hi I’m getting a NULL response back from request.parameters even when passing in parameters using the IDE run dialog. Am I missing something obvious?

var params = JSON.parse(request.parameters);
return params.test

ANSWERED
Marked as spam
Posted by - Asked on March 17, 2017 5:23 pm - 18 views

1 Replies

0
Private reply

Hi Wendy,

You’re getting NULL because the JSON.parse() function expects a string and the request.parameters is already a JSON object so there’s no need to parse it. So here’s how you can write it:

var params = request.parameters;
return params.test;

Regards,
Julien Mrad
Scriptr.io

Marked as spam
Posted by - Replied on March 17, 2017 6:25 pm