Hi!
I followed the tutorial here Message Sequences - Node-RED Essentials - YouTube
Trying to create this flow and add "price" as a new column, but the new price column did not show up in the debug console:
Can someone tell me where did I done wrong?
JSON below:
[
{
"id": "c1f66fa3e43837d1",
"type": "inject",
"z": "349547f842c76b7c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
"x": 190,
"y": 60,
"wires": [
[
"72f8358d0717cfe9"
]
]
},
{
"id": "5a725a3f065abf17",
"type": "csv",
"z": "349547f842c76b7c",
"name": "",
"sep": ",",
"hdrin": true,
"hdrout": "none",
"multi": "mult",
"ret": "\\n",
"temp": "",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 575,
"y": 60,
"wires": [
[
"d64d3c8cfeb829ce"
]
]
},
{
"id": "72f8358d0717cfe9",
"type": "template",
"z": "349547f842c76b7c",
"name": "CSV Data",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "Date,Quantity,Item\n2021-01-01,4,Apple\n2021-01-02,3,Banana\n2021-01-04,5,Peach",
"output": "str",
"x": 375,
"y": 60,
"wires": [
[
"5a725a3f065abf17"
]
]
},
{
"id": "d64d3c8cfeb829ce",
"type": "split",
"z": "349547f842c76b7c",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 740,
"y": 60,
"wires": [
[
"b8f69dcab2771ca2",
"687475a9ed71c06d"
]
]
},
{
"id": "b8f69dcab2771ca2",
"type": "debug",
"z": "349547f842c76b7c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 920,
"y": 60,
"wires": []
},
{
"id": "687475a9ed71c06d",
"type": "function",
"z": "349547f842c76b7c",
"name": "Add Cost",
"func": "var PRICES = {\n \"Apple\":10,\n \"Banana\":8,\n \"Peach\":6\n}\nmsg.payload.Cost = msg.payload.Quantity * PRICES[msg.payload.Item];\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 375,
"y": 165,
"wires": [
[
"f9def84e5e0b6380"
]
]
},
{
"id": "f9def84e5e0b6380",
"type": "join",
"z": "349547f842c76b7c",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
"x": 575,
"y": 165,
"wires": [
[
"8a0ca3ed561c9499"
]
]
},
{
"id": "8a0ca3ed561c9499",
"type": "csv",
"z": "349547f842c76b7c",
"name": "",
"sep": ",",
"hdrin": true,
"hdrout": "none",
"multi": "mult",
"ret": "\\n",
"temp": "",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 740,
"y": 165,
"wires": [
[
"dc7be974e1ec0df0"
]
]
},
{
"id": "dc7be974e1ec0df0",
"type": "debug",
"z": "349547f842c76b7c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 925,
"y": 165,
"wires": []
}
]