n8n LabAdvanced

Sort an Array of Objects by a Field in n8n

Show products from cheapest to most expensive in a Telegram message.

Live Execution Simulator Idle
πŸ“₯
Incoming Data
βš™οΈ
n8n Node
🎯
Next Step
> Ready. Type your expression below and click "Check Answer" to run the node.

Incoming Payload / Data:

{
  "products": [
    { "name": "Pro", "price": 49 },
    { "name": "Lite", "price": 9 },
    { "name": "Team", "price": 99 }
  ]
}
$json.products.sort((a, b) => )

βš™οΈ Your expression is executed against test data β€” any correct solution passes. +30 XP

Related labs