Accepts a path array and converts to a normalized path string.
The string will be in a form like:
$['aProperty']['anotherProperty][0].
The JSONPath terminal constructions ~ and ^ and type operators
like @string() are silently stripped.
Accepts a path array and converts to a JSON Pointer.
The string will be in a form like: /aProperty/anotherProperty/0
(with any ~ and / internal characters escaped as per the JSON
Pointer spec).
The JSONPath terminal constructions ~ and ^ and type operators
like @string() are silently stripped.
Exposes the cache object for those who wish to preserve and reuse it for optimization purposes.
-Accepts a path array and converts to a normalized path string.
The string will be in a form like:
$['aProperty']['anotherProperty][0].
The JSONPath terminal constructions ~ and ^ and type operators
like @string() are silently stripped.
Accepts a path array and converts to a JSON Pointer.
The string will be in a form like: /aProperty/anotherProperty/0
(with any ~ and / internal characters escaped as per the JSON
Pointer spec).
The JSONPath terminal constructions ~ and ^ and type operators
like @string() are silently stripped.
OptionalcallbackIf supplied, a callback will be called immediately upon retrieval of an end point value.
The three arguments supplied will be the value of the payload
(according to resultType), the type of the payload (whether it is
@@ -25,7 +25,7 @@
OptionalevalScript evaluation method.
+OptionalevalScript evaluation method.
safe: In browser, it will use a minimal scripting engine which doesn't
use eval or Function and satisfies Content Security Policy. In NodeJS,
it has no effect and is equivalent to native as scripting is safe there.
OptionalflattenWhether the returned array of results will be flattened to a +
OptionalflattenWhether the returned array of results will be flattened to a single dimension array.
OptionalignoreIgnore errors while evaluating JSONPath expression.
+OptionalignoreIgnore errors while evaluating JSONPath expression.
true: Don't break entire search if an error occurs while evaluating JSONPath expression on one key/value pair.
false: Break entire search if an error occurs while evaluating JSONPath expression on one key/value pair.
The JSON object to evaluate (whether of null, boolean, number, +
The JSON object to evaluate (whether of null, boolean, number, string, object, or array type).
-OptionalotherIn the current absence of JSON Schema support, +
OptionalotherIn the current absence of JSON Schema support,
one can determine types beyond the built-in types by adding the
perator @other() at the end of one's query.
If such a path is encountered, the otherTypeCallback will be invoked
@@ -63,20 +63,20 @@
transformations and return false).
OptionalparentIn the event that a query could be made to return the root node, +
OptionalparentIn the event that a query could be made to return the root node, this allows the parent of that root node to be returned within results.
OptionalparentIn the event that a query could be made to return the root node, +
OptionalparentIn the event that a query could be made to return the root node, this allows the parentProperty of that root node to be returned within results.
The JSONPath expression as a (normalized or unnormalized) string or +
The JSONPath expression as a (normalized or unnormalized) string or array.
-OptionalresultCan be case-insensitive form of "value", "path", "pointer", "parent", +
OptionalresultCan be case-insensitive form of "value", "path", "pointer", "parent", or "parentProperty" to determine respectively whether to return results as the values of the found items, as their absolute paths, as JSON Pointers to the absolute paths, as their parent objects, @@ -86,11 +86,11 @@
OptionalsandboxKey-value map of variables to be available to code evaluations such +
OptionalsandboxKey-value map of variables to be available to code evaluations such as filtering expressions. (Note that the current path and value will also be available to those expressions; see the Syntax section for details.)
-OptionalwrapWhether or not to wrap the results in an array.
+OptionalwrapWhether or not to wrap the results in an array.
If wrap is set to false, and no results are found, undefined will be returned (as opposed to an empty array when wrap is set to true).
If wrap is set to false and a single non-array result is found, that @@ -102,4 +102,4 @@
OptionalcallbackIf supplied, a callback will be called immediately upon retrieval of an end point value.
The three arguments supplied will be the value of the payload
(according to resultType), the type of the payload (whether it is
@@ -25,7 +25,7 @@
OptionalevalScript evaluation method.
+OptionalevalScript evaluation method.
safe: In browser, it will use a minimal scripting engine which doesn't
use eval or Function and satisfies Content Security Policy. In NodeJS,
it has no effect and is equivalent to native as scripting is safe there.
OptionalflattenWhether the returned array of results will be flattened to a +
OptionalflattenWhether the returned array of results will be flattened to a single dimension array.
OptionalignoreIgnore errors while evaluating JSONPath expression.
+OptionalignoreIgnore errors while evaluating JSONPath expression.
true: Don't break entire search if an error occurs while evaluating JSONPath expression on one key/value pair.
false: Break entire search if an error occurs while evaluating JSONPath expression on one key/value pair.
The JSON object to evaluate (whether of null, boolean, number, +
The JSON object to evaluate (whether of null, boolean, number, string, object, or array type).
-OptionalotherIn the current absence of JSON Schema support, +
OptionalotherIn the current absence of JSON Schema support,
one can determine types beyond the built-in types by adding the
perator @other() at the end of one's query.
If such a path is encountered, the otherTypeCallback will be invoked
@@ -63,20 +63,20 @@
transformations and return false).
OptionalparentIn the event that a query could be made to return the root node, +
OptionalparentIn the event that a query could be made to return the root node, this allows the parent of that root node to be returned within results.
OptionalparentIn the event that a query could be made to return the root node, +
OptionalparentIn the event that a query could be made to return the root node, this allows the parentProperty of that root node to be returned within results.
The JSONPath expression as a (normalized or unnormalized) string or +
The JSONPath expression as a (normalized or unnormalized) string or array.
-OptionalresultCan be case-insensitive form of "value", "path", "pointer", "parent", +
OptionalresultCan be case-insensitive form of "value", "path", "pointer", "parent", or "parentProperty" to determine respectively whether to return results as the values of the found items, as their absolute paths, as JSON Pointers to the absolute paths, as their parent objects, @@ -86,11 +86,11 @@
OptionalsandboxKey-value map of variables to be available to code evaluations such +
OptionalsandboxKey-value map of variables to be available to code evaluations such as filtering expressions. (Note that the current path and value will also be available to those expressions; see the Syntax section for details.)
-OptionalwrapWhether or not to wrap the results in an array.
+OptionalwrapWhether or not to wrap the results in an array.
If wrap is set to false, and no results are found, undefined will be returned (as opposed to an empty array when wrap is set to true).
If wrap is set to false and a single non-array result is found, that @@ -102,4 +102,4 @@
Exposes the cache object for those who wish to preserve and reuse it for optimization purposes.
-