1. Data Sorting Essentials
The Sort node provides an immediate organizational layer to your unstructured payloads. Whether you need to process the newest emails first, rank database records by highest revenue, or enforce an alphabetical standard before generating an HTML Report, this node acts as the foundational ordering step.
Configuration Parameters
- Field To Sort: Declare exactly which key the engine should evaluate. You can reach nested payloads securely using dot-syntax (e.g.
customer.billing.amount). Tip: Leave this completely empty if you are sorting an array of raw primitive values like [5, 2, 9]. - Data Type Enforcement: Data arriving via webhooks is often strictly parsed as strings. By enforcing the
NumberorDateTimetype, the engine safely parses "10" vs "2" mathematically (instead of alphabetically) to prevent sorting anomalies.
2. Professional Sorting Workflows
The nLink Sort Node natively utilizes the SliceStable architectural pattern. If two items share the exact same sorted value, the engine guarantees they will completely retain their original chronological order relative to each other, preventing data instability down the pipeline.
- Order Direction: Swap instantly between
Ascending(A-Z, 0-9, Oldest-First) andDescending(Z-A, 9-0, Newest-First). - Ignore Case Variability: For strings, ticking
Ignore Caseensures "apple" and "Zebra" are alphabetized naturally, treating uppercase and lowercase bytes as absolute equals.
3. Frequently Asked Questions (FAQ)
What happens if the 'Field To Sort' is missing in some items?
The engine employs a highly resilient Fail-Safe architecture. If a JSON object lacks the target sorting key, it evaluates it as null and gracefully shifts it towards the chronological end of the array, absolutely preventing your workflow from crashing.
Does this node mutate my original data?
Yes and No. The node performs a hyper-efficient shallow-copy before re-ordering the array structure. While the array index positions are completely mutated for downstream nodes, the deeply nested object values themselves are left entirely untouched.
