Skip to main content

Class: FilterSelector

jsonpath.selectors.FilterSelector

Base class for all JSONPath segments and selectors.

Hierarchy

Constructors

constructor

new FilterSelector(environment, token, expression): FilterSelector

Parameters

NameType
environmentJSONPathEnvironment
tokenToken
expressionLogicalExpression

Returns

FilterSelector

Overrides

JSONPathSelector.constructor

Defined in

src/path/selectors.ts:556

Properties

environment

Readonly environment: JSONPathEnvironment

Inherited from

JSONPathSelector.environment

Defined in

src/path/selectors.ts:557


expression

Readonly expression: LogicalExpression

Defined in

src/path/selectors.ts:559


token

Readonly token: Token

The token at the start of this selector.

Inherited from

JSONPathSelector.token

Defined in

src/path/selectors.ts:558

Methods

lazyResolve

lazyResolve(nodes): Generator<JSONPathNode, any, unknown>

Parameters

NameTypeDescription
nodesIterable<JSONPathNode>Nodes matched by preceding selectors.

Returns

Generator<JSONPathNode, any, unknown>

Overrides

JSONPathSelector.lazyResolve

Defined in

src/path/selectors.ts:604


resolve

resolve(nodes): JSONPathNode[]

Parameters

NameTypeDescription
nodesJSONPathNode[]Nodes matched by preceding selectors.

Returns

JSONPathNode[]

Overrides

JSONPathSelector.resolve

Defined in

src/path/selectors.ts:565


toString

toString(): string

Return a canonical string representation of this selector.

Returns

string

Overrides

JSONPathSelector.toString

Defined in

src/path/selectors.ts:638