Hello community, I need your help. This is what the incoming data looks like.
How to achieve the result so that if the key matches the values are appended
My WorkFlow:
{ "name": "Append data in array", "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "typeVersion": 1, "position": [ 250, 300 ] }, { "parameters": { "functionCode": "return [\n {\n json: {\n \"name\": \"Maxim\",\n \"data\": ['good','man']\n }\n },\n {\n json: {\n \"name\": \"Liza\",\n \"data\": ['good','woman']\n }\n },\n {\n json: {\n \"name\": \"Cat\",\n \"data\": ['pretty','cat']\n }\n },\n {\n json: {\n \"name\": \"Maxim\",\n \"data\": ['student']\n }\n },\n {\n json: {\n \"name\": \"Dog\",\n \"data\": ['safety','dog']\n }\n }\n]" }, "name": "incomingData", "type": "n8n-nodes-base.function", "typeVersion": 1, "position": [ 510, 290 ] }, { "parameters": { "functionCode": "return [\n {\n json: {\n \"name\": \"Maxim\",\n \"data\": ['good','man','student']\n }\n },\n {\n json: {\n \"name\": \"Liza\",\n \"data\": ['good','woman']\n }\n },\n {\n json: {\n \"name\": \"Cat\",\n \"data\": ['pretty','cat']\n }\n },\n {\n json: {\n \"name\": \"Dog\",\n \"data\": ['safety','dog']\n }\n }\n]" }, "name": "ResultDataExample", "type": "n8n-nodes-base.function", "typeVersion": 1, "position": [ 730, 290 ] } ], "connections": { "incomingData": { "main": [ [ { "node": "ResultDataExample", "type": "main", "index": 0 } ] ] }, "Start": { "main": [ [ { "node": "incomingData", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": {}, "id": "16" }