has

request.has(name)

Checks if a request parameter with specified name (key) exists. Returns true if exists, false otherwise.

Parameters:

The method has the following parameter:

ParametersDescription
nameName of the request parameter.
Example

If the script has the following request parameters:

console.log(request.has("email"));
console.log(request.has("userTitle"));
true
false