Skip to main content

Class: WildcardSelector

jsonpath.selectors.WildcardSelector

Base class for all JSONPath segments and selectors.

Hierarchy

Constructors

constructor

new WildcardSelector(environment, token, shorthand?): WildcardSelector

Parameters

NameTypeDefault value
environmentJSONPathEnvironmentundefined
tokenTokenundefined
shorthandbooleanfalse

Returns

WildcardSelector

Overrides

JSONPathSelector.constructor

Defined in

src/path/selectors.ts:306

Properties

environment

Readonly environment: JSONPathEnvironment

Inherited from

JSONPathSelector.environment

Defined in

src/path/selectors.ts:307


shorthand

Readonly shorthand: boolean = false

Defined in

src/path/selectors.ts:309


token

Readonly token: Token

The token at the start of this selector.

Inherited from

JSONPathSelector.token

Defined in

src/path/selectors.ts:308

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


resolve

resolve(nodes): JSONPathNode[]

Parameters

NameTypeDescription
nodesJSONPathNode[]Nodes matched by preceding selectors.

Returns

JSONPathNode[]

Overrides

JSONPathSelector.resolve

Defined in

src/path/selectors.ts:314


toString

toString(): string

Return a canonical string representation of this selector.

Returns

string

Overrides

JSONPathSelector.toString

Defined in

src/path/selectors.ts:354