Skip to main content

Function: lazyQuery()

lazyQuery(path, value): IterableIterator<JSONPathNode>

Defined in: src/path/index.ts:75

Lazily query JSON value value with JSONPath expression path. Lazy queries can be faster and more memory efficient when querying large datasets, especially when using recursive decent selectors.

Parameters​

path​

string

A JSONPath expression/query.

value​

JSONValue

The JSON-like value the JSONPath query is applied to.

Returns​

IterableIterator<JSONPathNode>

A sequence of JSONPathNode objects resulting from applying path to value.

Throws​

JSONPathSyntaxError If the path does not conform to standard syntax.

Throws​

JSONPathTypeError If filter function arguments are invalid, or filter expression are used in an invalid way.