Actions74
- ai Actions
- array Actions
- audiovideo Actions
- carbone Actions
- charts Actions
- code Actions
- data Actions
- datetime Actions
- events Actions
- files Actions
- geo Actions
- hellospaces Actions
- images Actions
- Get Metadata of an Image
- Scale an Image
- Overlay an Image on another Image
- Scale an Image to Fit Given Dimensions
- Resize an Image
- Mask an Image with Another Image
- Mask an Image with a Circle Mask
- Crops an image by the given x, y, width and height paramters.
- Convert Texts to an Image
- Convert HTML String or URL to an Image
- Generates a QRCode with given text and color.
- Get EXIF from Image
- Remove EXIF from Image
- Modify Image EXIF
- playground Actions
- spreadsheet Actions
- stripe Actions
- youtube Actions
data → Search in All Keys in a JSON Object
AI-generatedOverview
This node enables you to search for a specific string within all keys, values, or both in a provided JSON object. It is particularly useful when you need to locate data deeply nested within complex JSON structures, such as searching for configuration parameters, user information, or any other value without knowing its exact location in the object.
Practical examples:
- Searching for a user's email address across an entire API response.
- Locating all occurrences of a particular key (e.g., "status") in a large configuration file.
- Finding all values that match a certain pattern, such as IDs or codes, regardless of their nesting level.
Properties
| Name | Meaning |
|---|---|
| JSON Input | Object to search in. This is the JSON object where the search will be performed. |
| Search String | String to search for. The node will look for this string according to the selected scope and comparison method. |
| Scope | Scope to search in - 'keys' is default. Options: - keys: Search only in the keys of the JSON object. - values: Search only in the values. - all: Search in both keys and values. |
| Comparison | Comparison method. Options: - contains: Checks if the target contains the search string. - endswith: Checks if the target ends with the search string. - equal: Exact match. - equal_case_insensitive: Case-insensitive exact match. - startswith: Checks if the target starts with the search string. |
Output
The output will be a JSON object containing the results of the search. The structure typically includes:
- A list or array of matches found, each indicating the path within the JSON object where the match occurred and the matched value or key.
- If no matches are found, the result may be an empty array or object.
- In case of errors, the output will include an
errorfield with details about the issue.
Example output:
{
"matches": [
{
"path": "user.profile.email",
"value": "john.doe@example.com"
},
{
"path": "settings.notifications.email",
"key": "email"
}
]
}
Dependencies
- External Service: Requires access to the 1001fx API.
- API Key: You must configure the
1001fxApicredential in n8n. - n8n Configuration: No additional environment variables are required beyond the API credentials.
Troubleshooting
Common issues:
- Invalid JSON Input: If the provided JSON is malformed, the node may return an error indicating parsing failure.
- No Matches Found: If the search string does not exist in the specified scope, the output will simply contain no matches.
- Authentication Errors: If the API key is missing or invalid, you may receive authentication or authorization errors from the 1001fx API.
- Comparison Method Issues: Using an inappropriate comparison method (e.g., case-sensitive vs. case-insensitive) may lead to unexpected results.
Error messages:
"error": "Invalid API key"– Check your 1001fxApi credentials in n8n."error": "Malformed JSON input"– Ensure your JSON Input property contains valid JSON."error": "Request failed with status code 4xx/5xx"– Indicates an issue with the request; check your parameters and network connectivity.