Skip to main content

Class: BracketedSelection

jsonpath.selectors.BracketedSelection

Base class for all JSONPath segments and selectors.

Hierarchy

Constructors

constructor

new BracketedSelection(environment, token, items): BracketedSelection

Parameters

NameType
environmentJSONPathEnvironment
tokenToken
itemsBracketedSegment[]

Returns

BracketedSelection

Overrides

JSONPathSelector.constructor

Defined in

src/path/selectors.ts:651

Properties

environment

Readonly environment: JSONPathEnvironment

Inherited from

JSONPathSelector.environment

Defined in

src/path/selectors.ts:652


items

Readonly items: BracketedSegment[]

Defined in

src/path/selectors.ts:654


token

Readonly token: Token

The token at the start of this selector.

Inherited from

JSONPathSelector.token

Defined in

src/path/selectors.ts:653

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:672


resolve

resolve(nodes): JSONPathNode[]

Parameters

NameTypeDescription
nodesJSONPathNode[]Nodes matched by preceding selectors.

Returns

JSONPathNode[]

Overrides

JSONPathSelector.resolve

Defined in

src/path/selectors.ts:659


toString

toString(): string

Return a canonical string representation of this selector.

Returns

string

Overrides

JSONPathSelector.toString

Defined in

src/path/selectors.ts:680