JMESPath Transforms
Transform API data with JMESPath expressions
JMESPath Transforms
Pro Feature — JMESPath transforms require a Pro or Developer license.
JMESPath is a query language for JSON that allows you to transform and filter API responses before using them in YOOtheme.
What is JMESPath?
JMESPath lets you:
- Filter arrays based on conditions
- Sort data by specific fields
- Extract and reshape data
- Combine multiple operations
Basic Syntax
Accessing Fields
Filtering Arrays
Sorting
Limiting Results
Projections
Real-World Examples
E-commerce: Featured Products
Get only featured products, sorted by price:
Blog: Recent Posts
Get the 5 most recent published posts:
Events: Upcoming Only
Filter events to show only future dates:
Products: In Stock
Show only products that are in stock:
Nested Data: Extract Images
Get all image URLs from nested structure:
Using in API Mapper
- Open your connection settings
- Go to the Transform section (Pro/Developer only)
- Enter your JMESPath expression
- Click Test to preview results
- Save the connection
Testing Expressions
Online Tester
Use jmespath.org to test expressions with sample data.
In API Mapper
- Click Test Connection
- View the raw API response
- Write your JMESPath expression
- Preview the transformed result
Common Patterns
Safe Navigation
Handle missing data gracefully:
Combining Arrays
Merge multiple sources:
Conditional Values
Return different values based on conditions:
Limitations
- Complex expressions may impact performance
- Some advanced JMESPath functions may not be available
- Test thoroughly before using in production
Resources
Next Steps
Was this page helpful?