Sort Node
Sort workflow items by one or more field values. Custom comparator supported.
Written By pvdyck
Last updated 22 minutes ago
Sort Node
The Sort node reorders items based on field values, random shuffle, or a custom JavaScript comparator.
Sort Types
Parameters (Simple)
Parameters (Code)
Options
Tips
- Combine with the Limit node to get "top N" or "bottom N" results
- Use Simple mode for most cases -- add multiple sort fields for tie-breaking
- Code mode is useful for custom logic like locale-aware string sorting or multi-criteria comparisons
Limitations
- No natural sort -- Natural sort order (e.g., "item2" before "item10") is not built in
- Custom comparator code validation is limited to a regex check for a
returnkeyword