Skip to main content

Class: JSONPathQuery

Defined in: src/path/query.ts:10

Constructors​

Constructor​

new JSONPathQuery(environment, segments): JSONPathQuery

Defined in: src/path/query.ts:11

Parameters​

environment​

JSONPathEnvironment

segments​

Segment[]

Returns​

JSONPathQuery

Properties​

environment​

readonly environment: JSONPathEnvironment

Defined in: src/path/query.ts:12


segments​

readonly segments: Segment[]

Defined in: src/path/query.ts:13

Methods​

canonicalPath()​

canonicalPath(): string

Defined in: src/path/query.ts:68

Returns​

string


find()​

find(data): JSONPathNode[]

Defined in: src/path/query.ts:16

Parameters​

data​

JSONValue

Returns​

JSONPathNode[]


findAll()​

findAll(data): JSONValue[]

Defined in: src/path/query.ts:42

Parameters​

data​

JSONValue

Returns​

JSONValue[]


findAllIter()​

findAllIter(data): IterableIterator<JSONValue>

Defined in: src/path/query.ts:46

Parameters​

data​

JSONValue

Returns​

IterableIterator<JSONValue>


findIter()​

findIter(data): IterableIterator<JSONPathNode>

Defined in: src/path/query.ts:21

Parameters​

data​

JSONValue

Returns​

IterableIterator<JSONPathNode>


findOne()​

findOne(data): JSONPathNode | undefined

Defined in: src/path/query.ts:50

Parameters​

data​

JSONValue

Returns​

JSONPathNode | undefined


lazyQuery()​

lazyQuery(data): IterableIterator<JSONPathNode>

Defined in: src/path/query.ts:38

Parameters​

data​

JSONValue

Returns​

IterableIterator<JSONPathNode>

Deprecated​

Use findIter instead.


match()​

match(data): JSONPathNode | undefined

Defined in: src/path/query.ts:60

Parameters​

data​

JSONValue

Returns​

JSONPathNode | undefined

Deprecated​

Use findOne instead.


query()​

query(data): JSONPathNode[]

Defined in: src/path/query.ts:31

Parameters​

data​

JSONValue

Returns​

JSONPathNode[]

Deprecated​

Use find instead.


shorthandPath()​

shorthandPath(): string

Defined in: src/path/query.ts:72

Returns​

string


test()​

test(data): boolean

Defined in: src/path/query.ts:64

Parameters​

data​

JSONValue

Returns​

boolean