Skip to main content

Class: JSONPath

jsonpath.JSONPath

Constructors

constructor

new JSONPath(environment, selectors): JSONPath

Parameters

NameType
environmentJSONPathEnvironment
selectorsJSONPathSelector[]

Returns

JSONPath

Defined in

src/path/path.ts:20

Properties

environment

Readonly environment: JSONPathEnvironment

Defined in

src/path/path.ts:21


selectors

Readonly selectors: JSONPathSelector[]

Defined in

src/path/path.ts:22

Methods

lazyQuery

lazyQuery(value): IterableIterator<JSONPathNode>

Parameters

NameType
valueJSONValue

Returns

IterableIterator<JSONPathNode>

Defined in

src/path/path.ts:43


match

match(value): undefined | JSONPathNode

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

Parameters

NameTypeDescription
valueJSONValueJSON-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:61


query

query(value): JSONPathNodeList

Parameters

NameType
valueJSONValue

Returns

JSONPathNodeList

Defined in

src/path/path.ts:30


singularQuery

singularQuery(): boolean

Returns

boolean

Defined in

src/path/path.ts:75


toString

toString(): string

Returns

string

Defined in

src/path/path.ts:71