Skip to content

Instantly share code, notes, and snippets.

@mdimai666
Created April 18, 2018 07:58
Show Gist options
  • Save mdimai666/9d6ee34be79fc148895b0d3a5e33e466 to your computer and use it in GitHub Desktop.
Save mdimai666/9d6ee34be79fc148895b0d3a5e33e466 to your computer and use it in GitHub Desktop.
[
{
"id": "a943ef88.f0d67",
"type": "function",
"z": "3f9b5a25.189626",
"name": "loop",
"func": "if(msg.loop_array.length<1)\n return [null,msg];\n \nmsg.loop_current = msg.loop_array.shift();\nmsg.payload = msg.loop_current;\n\nreturn [msg]",
"outputs": 2,
"noerr": 0,
"x": 401,
"y": 1421,
"wires": [
[
"eecaa9f.628b358"
],
[
"18c68363.0f977d"
]
],
"outputLabels": [
"iteration",
"end"
],
"icon": "node-red/cog.png"
},
{
"id": "2f485153.0047de",
"type": "function",
"z": "3f9b5a25.189626",
"name": "init loop",
"func": "msg.loop_array = msg.payload;\nmsg.loop_array_save = msg.payload;\nmsg.loop_dt_start = new Date();\n\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 265,
"y": 1421,
"wires": [
[
"a943ef88.f0d67"
]
],
"icon": "node-red/cog.png"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment