Skip to content

JSONPath Tools / @jsonpath-tools/codemirror-lang-jsonpath / getQueryForTree

Function: getQueryForTree() ​

ts
function getQueryForTree(tree): Query;

Returns a JSONPath query associated with the given Lezer tree.

Parameters ​

tree ​

Tree

Lezer tree.

Returns ​

Query

Throws ​

When the given Lezer tree does not have any associated JSONPath query.