n8n LabIntermediate

Filter an Array of Objects in an n8n Expression

An API returns all orders. You only want to report on the paid ones.

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:

{
  "orders": [
    { "id": 1, "status": "paid" },
    { "id": 2, "status": "pending" },
    { "id": 3, "status": "paid" }
  ]
}
$json.orders.filter(o => )

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

Related labs