Extract values from objects and arrays using JSONPath
Object Extractor Tool is a Dify plugin that provides powerful JSONPath-based extraction capabilities for objects, arrays, and JSON strings. It automatically converts extracted values to appropriate types and provides type-safe outputs across multiple data types.
Extract values from objects using JSONPath expressions.
Tool Name:
Parameters:
Example Usage:
Nested Object Example:
Extract values from arrays using JSONPath expressions. The array can contain any type of elements (objects, strings, numbers, booleans, etc.).
Tool Name:
Parameters:
Example Usage:
Array of Primitives:
Array of Nested Objects:
Parse a JSON string and extract values using JSONPath. This is particularly useful when working with HTTP responses or other string-based JSON data.
Tool Name:
Parameters:
Example Usage:
Use Case: HTTP Response Processing
When using Dify's HTTP Request node, responses often come as strings. Use to parse and extract specific fields:
All three tools share the same output schema with automatic type conversion:
| Output Field | Type | Description | Default Value |
|---|---|---|---|
| boolean | Extracted boolean value | (if not set) | |
| number | Extracted number value | (if not set) | |
| string | Extracted string value | (empty string) | |
| array[boolean] | Extracted boolean array | (empty array) | |
| array[number] | Extracted number array | (empty array) | |
| array[string] | Extracted string array | (empty array) | |
| array[object] | Extracted object array | (empty array) | |
| string | String representation of any extracted value | (empty string) |
How to Use Outputs:
Extract specific fields from HTTP API responses:
Transform nested data structures by extracting specific values:
Process array elements in workflows:
Extract configuration values from JSON strings:
Common JSONPath patterns supported:
| Pattern | Description | Example |
|---|---|---|
| Root element | ||
| Property access | ||
| Bracket notation | ||
| Array index | ||
| Array slice | ||
| Wildcard (all elements) | ||
| Recursive descent |
See PRIVACY.md for privacy and licensing information.
For bug reports or feature requests, please contact the author: cazziwork