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