hasField
The hasField method checks to see if a field exists in the current document.
Syntax
hasField ( fieldname [, case])
Arguments
| Argument | Description | 
|---|---|
| fieldname | (string) The name of the field. | 
| case | (boolean) A boolean that specifies whether the fieldnameis case-sensitive. The field name is case-sensitive by default. | 
Returns
(Boolean). True if the field exists, false otherwise.