Splitting a array payload to peform an action for each object

I'm very new to nodered so please bear with me. I'm using it as part of a workflow solution. I've got the below payload from a node and want to perform an action for each item.

I need to update a database as such to add the pages shown above for each dataRecordID if that makes sense

Welcome to the forum @Jimbo84

If you feed that through a Split node it will send a message for each item in the array.

something like this where you first split the array, perform some action on the individual values and them combine the results together again using the join node:

[
    {
        "id": "d879ea9457ecd1cd",
        "type": "inject",
        "z": "f93e13e54f881a08",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "[1,2,3,4,5,6,7,8,9,10]",
        "payloadType": "json",
        "x": 803,
        "y": 159,
        "wires": [
            [
                "01253df4a5f32a0e"
            ]
        ]
    },
    {
        "id": "01253df4a5f32a0e",
        "type": "split",
        "z": "f93e13e54f881a08",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "property": "payload",
        "x": 1000,
        "y": 264,
        "wires": [
            [
                "36789140a11b2108"
            ]
        ]
    },
    {
        "id": "36789140a11b2108",
        "type": "function",
        "z": "f93e13e54f881a08",
        "name": "function 1",
        "func": "msg.payload += 1;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1174,
        "y": 150,
        "wires": [
            [
                "01cacb262a23a5c1"
            ]
        ]
    },
    {
        "id": "01cacb262a23a5c1",
        "type": "join",
        "z": "f93e13e54f881a08",
        "name": "",
        "mode": "auto",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "useparts": false,
        "accumulate": "false",
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "x": 1362,
        "y": 267,
        "wires": [
            [
                "8ff1dff43deaa2b6"
            ]
        ]
    },
    {
        "id": "8ff1dff43deaa2b6",
        "type": "debug",
        "z": "f93e13e54f881a08",
        "name": "debug 118",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1664,
        "y": 267,
        "wires": []
    }
]

it all looks like there is only one message flowing but you have imagine the link after the split as being a bunch of links all executing in parallel.

What do I need to split by though as if I use /n isn't not splitting it down so I can access counts>pages

If it is an array it will split into individual elements of the array.

If it is not splitting then add a debug node showing what is going into the split node, and another showing what is coming out. Leave the split node at its default settings.