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:
Parameters | Description |
---|---|
name | Name of the request parameter. |
Example
If the script has the following request parameters:
- email = [email protected]
- title = Engineer
- location = Barcelona
console.log(request.has("email"));
console.log(request.has("userTitle"));
true
false