1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/packages/node_modules/@node-red/nodes/examples/parser/csv/08 - Specify column names in input message.json
2021-05-10 15:39:23 +01:00

126 lines
3.0 KiB
JSON

[
{
"id": "b05816ab.7f2b08",
"type": "comment",
"z": "c6ffdacd.d887e8",
"name": "Specify column names in input message",
"info": "Column names can be specified by `columns` property of incoming message.\n",
"x": 240,
"y": 200,
"wires": []
},
{
"id": "39205b5c.690684",
"type": "inject",
"z": "c6ffdacd.d887e8",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 200,
"y": 260,
"wires": [
[
"526b59ba.2fa068"
]
]
},
{
"id": "b78a407e.2d083",
"type": "csv",
"z": "c6ffdacd.d887e8",
"name": "",
"sep": ",",
"hdrin": false,
"hdrout": "all",
"multi": "one",
"ret": "\\n",
"temp": "",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 750,
"y": 260,
"wires": [
[
"8b7084dd.986f68"
]
]
},
{
"id": "526b59ba.2fa068",
"type": "template",
"z": "c6ffdacd.d887e8",
"name": "JS object",
"field": "payload",
"fieldType": "msg",
"format": "json",
"syntax": "plain",
"template": "[\n {\n \"kind\": \"Apple\",\n \"price\": 100,\n \"origin\": \"Canada\"\n },\n {\n \"kind\": \"Orange\",\n \"price\": 120,\n \"origin\": \"USA\"\n },\n {\n \"kind\": \"Banana\",\n \"price\": 80,\n \"origin\": \"Philippines\"\n }\n]",
"output": "json",
"x": 370,
"y": 260,
"wires": [
[
"b204077a.227778"
]
]
},
{
"id": "8b7084dd.986f68",
"type": "debug",
"z": "c6ffdacd.d887e8",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 260,
"wires": []
},
{
"id": "b204077a.227778",
"type": "change",
"z": "c6ffdacd.d887e8",
"name": "",
"rules": [
{
"t": "set",
"p": "columns",
"pt": "msg",
"to": "kind,price",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 570,
"y": 260,
"wires": [
[
"b78a407e.2d083"
]
]
}
]