mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
99 lines
2.5 KiB
JSON
99 lines
2.5 KiB
JSON
[
|
|
{
|
|
"id": "2ebdd51e.c5d17a",
|
|
"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,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "2b4d538d.ada07c",
|
|
"type": "inject",
|
|
"z": "4b63452d.672afc",
|
|
"name": "",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "",
|
|
"payload": "",
|
|
"payloadType": "date",
|
|
"x": 260,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"3e5c9e8.5065b62"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "db02c7be.0984e8",
|
|
"type": "csv",
|
|
"z": "4b63452d.672afc",
|
|
"name": "",
|
|
"sep": ",",
|
|
"hdrin": false,
|
|
"hdrout": "all",
|
|
"multi": "one",
|
|
"ret": "\\n",
|
|
"temp": "kind,price",
|
|
"skip": "0",
|
|
"strings": true,
|
|
"include_empty_strings": "",
|
|
"include_null_values": "",
|
|
"x": 600,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"61f8b772.ddb1f8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3e5c9e8.5065b62",
|
|
"type": "template",
|
|
"z": "4b63452d.672afc",
|
|
"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": 430,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"db02c7be.0984e8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "61f8b772.ddb1f8",
|
|
"type": "debug",
|
|
"z": "4b63452d.672afc",
|
|
"name": "",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 780,
|
|
"y": 1260,
|
|
"wires": []
|
|
}
|
|
] |