Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@IT-Berater
Last active October 25, 2019 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IT-Berater/3e2894aaaef006667c5622a3f8ebf1d7 to your computer and use it in GitHub Desktop.
Save IT-Berater/3e2894aaaef006667c5622a3f8ebf1d7 to your computer and use it in GitHub Desktop.
Filter JSON Object to one value
[
{
"id": "12ce7612.4a38aa",
"type": "tab",
"label": "REST JSON",
"disabled": false,
"info": ""
},
{
"id": "7ba54c13.dd120c",
"type": "http request",
"z": "12ce7612.4a38aa",
"name": "Raspberry Pi REST Systemabfrage",
"method": "GET",
"ret": "obj",
"paytoqs": false,
"url": "http://10.10.10.10:8080/info",
"tls": "",
"proxy": "",
"x": 400,
"y": 200,
"wires": [
[
"8103ae1a.cb1288",
"c107ae7c.b96418"
]
]
},
{
"id": "4513a22b.d7b27c",
"type": "debug",
"z": "12ce7612.4a38aa",
"name": "Debugausgabe",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 920,
"y": 200,
"wires": []
},
{
"id": "b52bb406.5bdf48",
"type": "inject",
"z": "12ce7612.4a38aa",
"name": "Start Abfrage",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "",
"x": 150,
"y": 200,
"wires": [
[
"7ba54c13.dd120c"
]
]
},
{
"id": "eda0fc2a.1cda2",
"type": "comment",
"z": "12ce7612.4a38aa",
"name": "(c) 2019 Thomas Wenzlaff www.wenzlaff.info",
"info": "",
"x": 230,
"y": 120,
"wires": []
},
{
"id": "8103ae1a.cb1288",
"type": "function",
"z": "12ce7612.4a38aa",
"name": "Filter Temperatur",
"func": "var nachricht=\"Die Temperatur ist \" + msg.payload[\"CPU Temperature\"] + \" Grad Celsius\";\nvar tstamp=(new Date()).toISOString().replace(/t/gi,' ').trim();\nmsg.payload = nachricht + \" am \" + tstamp;\nmsg.topic=nachricht;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 670,
"y": 200,
"wires": [
[
"4513a22b.d7b27c"
]
]
},
{
"id": "c107ae7c.b96418",
"type": "debug",
"z": "12ce7612.4a38aa",
"name": "Alle Daten Debugausgabe",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 690,
"y": 100,
"wires": []
},
{
"id": "2748fe21.9dccf2",
"type": "comment",
"z": "12ce7612.4a38aa",
"name": "Filter einen Wert aus einer JSON REST Abfrage",
"info": "",
"x": 240,
"y": 60,
"wires": []
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment