Skip to main content

Class: JSONPathQuery

Constructors

new JSONPathQuery()

new JSONPathQuery(environment, segments): JSONPathQuery

Parameters

environment

JSONPathEnvironment

segments

JSONPathSegment[]

Returns

JSONPathQuery

Defined in

src/path/path.ts:16

Properties

environment

readonly environment: JSONPathEnvironment

Defined in

src/path/path.ts:17


segments

readonly segments: JSONPathSegment[]

Defined in

src/path/path.ts:18

Methods

lazyQuery()

lazyQuery(value): IterableIterator<JSONPathNode, any, any>

Parameters

value

JSONValue

Returns

IterableIterator<JSONPathNode, any, any>

Defined in

src/path/path.ts:39


match()

match(value): undefined | JSONPathNode

Return a JSONPathNode instance for the first object found in value matching this query.

Parameters

value

JSONValue

JSON-like data to which this query will be applied.

Returns

undefined | JSONPathNode

The first node in value matching this query, or undefined if there are no matches.

Defined in

src/path/path.ts:57


query()

query(value): JSONPathNodeList

Parameters

value

JSONValue

Returns

JSONPathNodeList

Defined in

src/path/path.ts:26


singularQuery()

singularQuery(): boolean

Returns

boolean

Defined in

src/path/path.ts:71


toString()

toString(): string

Returns

string

Defined in

src/path/path.ts:67