Comparison

[ Interface ]

export interface Comparison {
    path?: string;
    comparator: '==' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'contains not' | '== [ignore case]' | '!= [ignore case]' | 'contains [ignore case]' | 'contains not [ignore case]';
    value: string | number | Date | boolean;
}

Defines a comparison between a variable and a specified value. If the variable contains an object, path can be used to address a property. If the variable contains a primitive data type, path must not be set.

This interface is used in filters.

Properties

Name

Type

Description

path [ optional ]

string

The path to the property to be compared. Nestings are addressed via ::, array accesses via []. Example: myObject::myArray[0]::myProperty

comparator

string

Specifies how to compare. Valid values are: == and != for numbers, dates, strings and truth values, <, >, <= and >= for numbers and dates and contains, contains not, == [ignore case], != [ignore case], contains [ignore case] and contains not [ignore case] for strings.

value

string, number, Date, boolean

The value to be compared with.

Comparison 1:

Available from version 1.10