1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fix duplicate csv node example (#2980)

This commit is contained in:
Hiroyasu Nishiyama 2021-05-10 23:39:23 +09:00 committed by GitHub
parent f249d6306f
commit eddddc6c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,18 +1,18 @@
[ [
{ {
"id": "2ebdd51e.c5d17a", "id": "b05816ab.7f2b08",
"type": "comment", "type": "comment",
"z": "4b63452d.672afc", "z": "c6ffdacd.d887e8",
"name": "Convert array of JavaScript objects to CSV with column name header", "name": "Specify column names in input message",
"info": "CSV node can convert an array of JavaScript objects to multi-line CSV text with column name header at first line.", "info": "Column names can be specified by `columns` property of incoming message.\n",
"x": 390, "x": 240,
"y": 1200, "y": 200,
"wires": [] "wires": []
}, },
{ {
"id": "2b4d538d.ada07c", "id": "39205b5c.690684",
"type": "inject", "type": "inject",
"z": "4b63452d.672afc", "z": "c6ffdacd.d887e8",
"name": "", "name": "",
"props": [ "props": [
{ {
@ -30,41 +30,41 @@
"topic": "", "topic": "",
"payload": "", "payload": "",
"payloadType": "date", "payloadType": "date",
"x": 260, "x": 200,
"y": 1260, "y": 260,
"wires": [ "wires": [
[ [
"3e5c9e8.5065b62" "526b59ba.2fa068"
] ]
] ]
}, },
{ {
"id": "db02c7be.0984e8", "id": "b78a407e.2d083",
"type": "csv", "type": "csv",
"z": "4b63452d.672afc", "z": "c6ffdacd.d887e8",
"name": "", "name": "",
"sep": ",", "sep": ",",
"hdrin": false, "hdrin": false,
"hdrout": "all", "hdrout": "all",
"multi": "one", "multi": "one",
"ret": "\\n", "ret": "\\n",
"temp": "kind,price", "temp": "",
"skip": "0", "skip": "0",
"strings": true, "strings": true,
"include_empty_strings": "", "include_empty_strings": "",
"include_null_values": "", "include_null_values": "",
"x": 600, "x": 750,
"y": 1260, "y": 260,
"wires": [ "wires": [
[ [
"61f8b772.ddb1f8" "8b7084dd.986f68"
] ]
] ]
}, },
{ {
"id": "3e5c9e8.5065b62", "id": "526b59ba.2fa068",
"type": "template", "type": "template",
"z": "4b63452d.672afc", "z": "c6ffdacd.d887e8",
"name": "JS object", "name": "JS object",
"field": "payload", "field": "payload",
"fieldType": "msg", "fieldType": "msg",
@ -72,18 +72,18 @@
"syntax": "plain", "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]", "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", "output": "json",
"x": 430, "x": 370,
"y": 1260, "y": 260,
"wires": [ "wires": [
[ [
"db02c7be.0984e8" "b204077a.227778"
] ]
] ]
}, },
{ {
"id": "61f8b772.ddb1f8", "id": "8b7084dd.986f68",
"type": "debug", "type": "debug",
"z": "4b63452d.672afc", "z": "c6ffdacd.d887e8",
"name": "", "name": "",
"active": true, "active": true,
"tosidebar": true, "tosidebar": true,
@ -92,8 +92,35 @@
"complete": "false", "complete": "false",
"statusVal": "", "statusVal": "",
"statusType": "auto", "statusType": "auto",
"x": 780, "x": 930,
"y": 1260, "y": 260,
"wires": [] "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"
]
]
} }
] ]