Advanced JSONPath Filtering and Selectors
mainJSONPath Plus provides several non-standard selectors that extend the original specification to allow for more complex queries:
@parent: Access the parent object of the current item.@root: Access the root of the JSON document.@property: Access the name of the property of the current item (useful when iterating over object members).@path: Access the full path of the current item.@parentProperty: Access the name of the property that holds the current item (e.g., the key in an object or the index in an array).^(Caret): A trailing selector that returns the parent of the current selection.~(Tilde): A trailing selector that returns the property names (keys) instead of the values.@number(),@string(),@boolean(), etc.: Type-based selectors to filter by data type.@match(regex): Filter items based on a regular expression match.
Note: To access properties with special characters within a filter, use the bracket notation: [?(@['special-property'])] or [?(@['...'])].