Spiltting Object

Hello , I have an object as shown below.

I would like to split up “Receipt_Photo” two url as following

{
{" Receipt_Photo1" : "https: . … url1 "},
{“Receipt_Photo2” : " https: … url2 " }
}

I have tried the “list node” to split, but it return the same name ( Receipt_Photo ).

May i know how should i proceed it to have name 1 and name 2.

May you have a look for that workflow:

{
  "nodes": [
    {
      "parameters": {
        "functionCode": "return [{\n  \"json\":{\n    \"urls\": [\n      \"https://i.imgur.com/eQc64YI.png\",\n      \"https://i.imgur.com/NnrcHyn.png\"\n    ]\n  }\n}]"
      },
      "name": "Function9",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        280,
        -680
      ]
    },
    {
      "parameters": {
        "functionCode": "r = {}\n\nitems[0].json.urls.map((item, i) => r['picture'+i] = item)\n\nreturn [{\n  \"json\": r\n}];"
      },
      "name": "Function10",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        500,
        -680
      ]
    }
  ],
  "connections": {
    "Function9": {
      "main": [
        [
          {
            "node": "Function10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

It’s not split node, but function, but it does what you need i think

1 Like