feat: add JSONPathExtractor tool #5052
Merged
HenryHengZJ merged 5 commits intoFlowiseAI:mainfrom Aug 18, 2025
Merged
Conversation
- Implement JSONPathExtractor tool for extracting values from JSON using path notation - Use lodash.get for robust path extraction supporting edge cases (numeric string keys, array indexing) - Add configurable error handling with returnNullOnError parameter - Include comprehensive test suite with 34 tests covering all scenarios - Support JSON strings, objects, and arrays as input
8dd3929 to
418299b
Compare
Contributor
|
love these super useful tools you have added! and the additional of the unit test let me know if you need help on resolving the pnpm lock conflict |
Contributor
Author
|
Sure! Thanks for switch reply! |
Contributor
Author
|
@HenryHengZJ Mind to check it and wrap it up? Thanks |
HenryHengZJ
approved these changes
Aug 15, 2025
Prevents test files from being included in the dist folder which was causing "jest is not defined" errors during server startup.
Contributor
Author
|
Fixed warning about missing jest when server start. |
Contributor
|
thanks! |
erhhung
pushed a commit
to erhhung/flowise
that referenced
this pull request
Oct 5, 2025
* feat: add JSONPathExtractor tool with lodash-based path extraction - Implement JSONPathExtractor tool for extracting values from JSON using path notation - Use lodash.get for robust path extraction supporting edge cases (numeric string keys, array indexing) - Add configurable error handling with returnNullOnError parameter - Include comprehensive test suite with 34 tests covering all scenarios - Support JSON strings, objects, and arrays as input * fix lint * Update pnpm-lock.yaml * fix: exclude test files from TypeScript compilation Prevents test files from being included in the dist folder which was causing "jest is not defined" errors during server startup. --------- Co-authored-by: Henry Heng <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
When building AI workflows in Flowise, users often need to extract specific values from API responses or structured data. Currently, there's no built-in tool to easily parse JSON and extract nested values without writing custom code.
Use Cases
Example Usage
Consider an e-commerce workflow that needs to process order data from an API:
With JSONPathExtractor, you can easily extract:
order.customer.email→ "[email protected]"order.items[0].price→ 999.99order.shipping.address.city→ "San Francisco"Implementation Details
Test Coverage
Added unit tests to cover:
Result of the run:
Screenshot of tool configuration page