Skip to main content

Class: LogicalExpression

jsonpath.expressions.LogicalExpression

Base class for all filter expressions.

Hierarchy

Constructors

constructor

new LogicalExpression(token, expression): LogicalExpression

Parameters

NameType
tokenToken
expressionFilterExpression

Returns

LogicalExpression

Overrides

FilterExpression.constructor

Defined in

src/path/expression.ts:172

Properties

expression

Readonly expression: FilterExpression

Defined in

src/path/expression.ts:174


token

Readonly token: Token

Inherited from

FilterExpression.token

Defined in

src/path/expression.ts:173

Methods

evaluate

evaluate(context): boolean

Evaluate the filter expression in the given context.

Parameters

NameTypeDescription
contextFilterContextEvaluation context.

Returns

boolean

Overrides

FilterExpression.evaluate

Defined in

src/path/expression.ts:179


toString

toString(): string

Return a string representation of the expression.

Returns

string

Overrides

FilterExpression.toString

Defined in

src/path/expression.ts:185