Parser Flow
Parse and extract nested values from JSON objects.
How to Use
Configuration
The Parser flow helps you extract specific information from JSON data using simple path expressions. Configure it by specifying:
- Parser Path: Use dot notation to navigate to the data you want (e.g.,
user.name
,items[0].price
) - JSON Object: The data structure you want to filter and extract from
Configuration Examples
Extract User Information
Configuration:{
"parserPath": "user.profile.name",
"jsonObject": {
"user": {
"profile": {
"name": "John Doe",
"email": "john@example.com",
"age": 30
}
}
}
}
Output: "John Doe"
Get First Item from a List
Configuration:{
"parserPath": "contacts[0].email",
"jsonObject": {
"contacts": [
{
"name": "Alice Smith",
"email": "alice@example.com"
},
{
"name": "Bob Johnson",
"email": "bob@example.com"
}
]
}
}
Output: "alice@example.com"
Extract All Items from Array
Configuration:{
"parserPath": "users[*].email",
"jsonObject": {
"users": [
{"name": "John", "email": "john@example.com"},
{"name": "Jane", "email": "jane@example.com"},
{"name": "Bob", "email": "bob@example.com"}
]
}
}
Output: ["john@example.com", "jane@example.com", "bob@example.com"]
Get Nested Values
Configuration:{
"parserPath": "order.total",
"jsonObject": {
"order": {
"id": "12345",
"customer": {
"name": "John Doe"
},
"items": [
{"product": "Laptop", "price": 999.99},
{"product": "Mouse", "price": 29.99}
],
"total": 1059.97
}
}
}
Output: 1059.97
What You Get Back
The parser returns the exact data you specify:
- Text values: Names, descriptions, messages
- Numbers: Prices, quantities, IDs
- Lists: Arrays of items, emails, names
- True/False values: Status flags, settings
- Complex objects: When you need the whole structure
Simple Path Guide
user.name
- Get name from user objectitems[0].price
- Get price of first itemusers[*].email
- Get all user emailsdata.results[2].title
- Get title of third resultsettings.notifications
- Get notification setting
Common Use Cases
- Filter API responses: Get only the data you need from large responses
- Extract form data: Pull specific fields from submitted forms
- Process lists: Get specific items from arrays of data
- Navigate complex data: Drill down into nested information
- Data cleanup: Extract clean values from messy data structures
Technical Details
Overview
The Parser flow specializes in converting, extracting, and transforming data from various formats into structured, usable information for your workflows and applications.
Capabilities
- JSON Parsing: Extract values from JSON objects using dot notation
- Array Handling: Process arrays with index or wildcard selection
- Nested Extraction: Navigate deeply nested object structures
- Data Transformation: Convert data types and formats
- Batch Processing: Extract multiple values in one operation
- Error Handling: Graceful handling of missing or invalid paths
Advanced Parser Paths
Conditional Extraction
// Extract only items with price > 100
items[?(@.price > 100)].name
// Get users with admin role
users[?(@.role == 'admin')].name
Multiple Path Extraction
// Extract multiple properties at once
{
"name": "user.profile.name",
"email": "user.contact.email",
"age": "user.profile.age"
}
Array Filtering and Mapping
// Get product names where quantity > 1
order.items[?(@.quantity > 1)].product
// Extract all prices
order.items[*].price
Supported Data Formats
- JSON: Native JSON object parsing
- Stringified JSON: Parse JSON strings
- Arrays: Handle array structures
- Nested Objects: Deep object navigation
- Mixed Types: Handle various data types within structures
Error Handling
Common parsing scenarios:
Path Not Found:
- Returns
null
or specified default value - Provides clear error message with path location
Invalid JSON:
- Validates JSON structure before parsing
- Returns parsing error details
Type Mismatches:
- Handles type conversions when possible
- Reports type conflicts clearly
Performance Optimization
- Path Caching: Cache frequently used parser paths
- Lazy Evaluation: Only parse needed portions of large objects
- Batch Operations: Process multiple extractions efficiently
- Memory Management: Optimize memory usage for large datasets
Integration Examples
With API Data
// Parse cryptocurrency API response
const apiResponse = {
"data": {
"bitcoin": {
"usd": 45000,
"usd_24h_change": 2.5
}
}
};
// Extract Bitcoin price
parserPath: "data.bitcoin.usd"
// Output: 45000
With User Forms
// Parse form submission
const formData = {
"user": {
"personal": {
"firstName": "John",
"lastName": "Doe"
},
"contact": {
"email": "john@example.com"
}
}
};
// Extract full name parts
parserPaths: {
"firstName": "user.personal.firstName",
"lastName": "user.personal.lastName"
}