Just make a list of objects in function node and send that. Using node red 4.0.5.
[
{
"id": "5704b41a79567472",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e8d25d6757046128",
"type": "inject",
"z": "5704b41a79567472",
"name": "",
"props": [
{
"p": "timestamp",
"v": "",
"vt": "date"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 190,
"y": 120,
"wires": [
[
"ec9f31558ba34498",
"1ce0a7c7d16f529c"
]
]
},
{
"id": "1ce0a7c7d16f529c",
"type": "function",
"z": "5704b41a79567472",
"name": "function 22",
"func": "const messages = [];\nfor(let i = 0; i < 10; i++){\n messages.push({\n nr: i+1\n });\n}\nreturn [messages];",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 590,
"y": 120,
"wires": [
[
"492b126bca0438ae"
]
]
},
{
"id": "60c6aa58e443d024",
"type": "debug",
"z": "5704b41a79567472",
"name": "debug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 910,
"y": 120,
"wires": []
},
{
"id": "492b126bca0438ae",
"type": "delay",
"z": "5704b41a79567472",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 770,
"y": 120,
"wires": [
[
"60c6aa58e443d024"
]
]
},
{
"id": "ec9f31558ba34498",
"type": "delay",
"z": "5704b41a79567472",
"name": "",
"pauseType": "delay",
"timeout": "500",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 390,
"y": 160,
"wires": [
[
"1ce0a7c7d16f529c"
]
]
}
]