I am receiving a message with a http-in node, according to Nuki the callback function is supposed to deliver a JSON list. I want to extract from the list some values, but I am getting some header information in addition from the http-in node, some simple payload.mode doesn't work
[{"id":"897d8faf.9d9df8","type":"debug","z":"427fc89b.e34038","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":440,"y":2540,"wires":[]},{"id":"a11c1fb0.a08fe8","type":"tcp in","z":"427fc89b.e34038","name":"JSON","server":"server","host":"","port":"8186","datamode":"single","datatype":"utf8","newline":"{","topic":"","base64":false,"x":130,"y":2540,"wires":[["897d8faf.9d9df8"]]}]
The debug output gives me
POST / HTTP/1.0
User-Agent: NukiBridge_xxxxxxx
Host: 192.168.178.32
Connection: Close
Content-Type: application/json;charset=utf-8
Content-Length: 224
{"deviceType": 0, "nukiId": xxxxxxxx, "mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "batteryCharging": false, "batteryChargeState": 40, "doorsensorState": 2, "doorsensorStateName": "door closed"}
I guess I need to remove the header before the "{", in order to be able parse each value, but I have no clue how to do that.