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/json/01 - Convert JSON string to JavaScript object.json

92 lines
2.0 KiB
JSON
Raw Permalink Normal View History

2020-11-03 12:06:18 +01:00
[
{
"id": "9976e95d.2f8398",
"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": 240,
"y": 180,
"wires": [
[
"d94fc083.49d87"
]
]
},
{
"id": "6684abb1.8eb454",
"type": "comment",
"z": "4b63452d.672afc",
"name": "Convert JSON string to JS object",
"info": "JSON node can convert JSON string to JavaScript object.",
"x": 250,
"y": 120,
"wires": []
},
{
"id": "d94fc083.49d87",
"type": "template",
"z": "4b63452d.672afc",
"name": "JSON string",
"field": "payload",
"fieldType": "msg",
"format": "json",
"syntax": "plain",
"template": "{\n \"kind\": \"Apple\",\n \"price\": 100,\n \"origin\": \"Canada\"\n}",
"output": "str",
"x": 410,
"y": 180,
"wires": [
[
"1a3dc54a.78598b"
]
]
},
{
"id": "8950a55d.023988",
"type": "debug",
"z": "4b63452d.672afc",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 180,
"wires": []
},
{
"id": "1a3dc54a.78598b",
"type": "json",
"z": "4b63452d.672afc",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 570,
"y": 180,
"wires": [
[
"8950a55d.023988"
]
]
}
]