Some checks failed
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
67 lines
1.3 KiB
JSON
67 lines
1.3 KiB
JSON
{
|
||
"id": "268",
|
||
"name": "Sort Node Code Sorting Type",
|
||
"active": false,
|
||
"nodes": [
|
||
{
|
||
"parameters": {},
|
||
"type": "n8n-nodes-base.manualTrigger",
|
||
"typeVersion": 1,
|
||
"position": [-448, 240],
|
||
"id": "f341af5c-89b6-4277-b47a-1cdd64a8fff8",
|
||
"name": "When clicking ‘Execute workflow’"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"type": "code",
|
||
"code": "const first = a.json.id;\nconst second = b.json.id;\n\nreturn first === second \n ? 0\n : first < second\n ? -1\n : 1;"
|
||
},
|
||
"type": "n8n-nodes-base.sort",
|
||
"typeVersion": 1,
|
||
"position": [0, 240],
|
||
"id": "6d0b50cc-6cee-4215-b04a-902e2c95798f",
|
||
"name": "Sort",
|
||
"executeOnce": false
|
||
},
|
||
{
|
||
"parameters": {
|
||
"jsCode": "return [\n {id: 3, char: 'c'},\n {id: 4, char: 'd'},\n {id: 5, char: 'e'},\n {id: 1, char: 'a'},\n {id: 2, char: 'b'},\n];"
|
||
},
|
||
"id": "5a813a47-77ed-4781-97cb-22a0d2226e58",
|
||
"name": "Code",
|
||
"type": "n8n-nodes-base.code",
|
||
"typeVersion": 1,
|
||
"position": [-224, 240]
|
||
}
|
||
],
|
||
"connections": {
|
||
"When clicking ‘Execute workflow’": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Code",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Sort": {
|
||
"main": [[]]
|
||
},
|
||
"Code": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Sort",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
}
|
||
},
|
||
"settings": null,
|
||
"tags": []
|
||
}
|