Skip to main content

Function: query()

query(path, value): JSONPathNodeList

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

Query JSON value value with JSONPath expression path.

Parameters​

path​

string

A JSONPath expression/query.

value​

JSONValue

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

Returns​

JSONPathNodeList

A list of JSONPathNode objects, one for each value matched by path in 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.