Filter JSON Object to one value

Filter JSON Object to one value. See http://blog.wenzlaff.de/?p=13765 in german.

NodeRed

[{"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":[]}]

Flow Info

Created 5 years, 6 months ago
Rating: 5 3

Owner

Actions

Rate:

Node Types

Core
  • comment (x2)
  • debug (x2)
  • function (x1)
  • http request (x1)
  • inject (x1)
Other
  • tab (x1)

Tags

  • JSON
  • wenzlaff.de
  • www.wenzlaff.de
  • Raspberry
  • Pi
  • Filter
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option