Hello community, I need your help. This is what the incoming data looks like.
How to combine values in one object
My WorkFlow: { "name": "Need help", "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "typeVersion": 1, "position": [ 250, 300 ] }, { "parameters": { "functionCode": "return [\n {\n json:[\n {\n id: 1,\n name: \"Jim\"\n }, \n {\n id: 2,\n name: \"Stefan\"\n },\n {\n id: 3,\n name: \"Hans\"\n }\n ]\n }\n];" }, "name": "Mock Data", "type": "n8n-nodes-base.function", "position": [ 500, 210 ], "typeVersion": 1 }, { "parameters": { "functionCode": "return items[0].json.map(item => { \n return {\n json: item,\n }\n})\n" }, "name": "Create JSON-items", "type": "n8n-nodes-base.function", "position": [ 740, 210 ], "typeVersion": 1 }, { "parameters": { "functionCode": "return [\n {\n json:\n {\n 1: \"Jim\",\n 2: \"Stefan\",\n 3: \"Hans\"\n }\n }\n];" }, "name": "NEED DATA in 1 Object", "type": "n8n-nodes-base.function", "position": [ 900, 340 ], "typeVersion": 1 } ], "connections": { "Mock Data": { "main": [ [ { "node": "Create JSON-items", "type": "main", "index": 0 }, { "node": "NEED DATA in 1 Object", "type": "main", "index": 0 } ] ] }, "Start": { "main": [ [ { "node": "Mock Data", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": {}, "id": "82" }

