Class: JSONPathSelector
jsonpath.selectors.JSONPathSelector
Base class for all JSONPath segments and selectors.
Hierarchy
-
JSONPathSelector
Constructors
constructor
• new JSONPathSelector(environment
, token
): JSONPathSelector
Parameters
Name | Type | Description |
---|---|---|
environment | JSONPathEnvironment | - |
token | Token | The token at the start of this selector. |
Returns
Defined in
Properties
environment
• Readonly
environment: JSONPathEnvironment
Defined in
token
• Readonly
token: Token
The token at the start of this selector.
Defined in
Methods
lazyResolve
▸ lazyResolve(nodes
): Generator
<JSONPathNode
, any
, unknown
>
Parameters
Name | Type | Description |
---|---|---|
nodes | Iterable <JSONPathNode > | Nodes matched by preceding selectors. |
Returns
Generator
<JSONPathNode
, any
, unknown
>
Defined in
resolve
▸ resolve(nodes
): JSONPathNode
[]
Parameters
Name | Type | Description |
---|---|---|
nodes | JSONPathNode [] | Nodes matched by preceding selectors. |
Returns
Defined in
toString
▸ toString(): string
Return a canonical string representation of this selector.
Returns
string