Good morning and excuse my English. This is my second participation in the forum. I am trying to convert the response of a python file into JSON, but the payload contains other strings besides the one I want to convert. The strings "before" and "after" should be ignored. My goal is to get a JSON that I can then somehow display on the dashboard. Thanks a lot.
[{"id":"f85aca3.1724b38","type":"exec","z":"ce7d7a5e.e05188","command":"python3 /home/pi/Desktop/return.py","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"return.py","x":980,"y":580,"wires":[["c8d0c1df.9d9e2","588ca8df.9cc898"],["65c03a65.1774e4"],["2abbcd10.2c0472"]]},{"id":"779faa97.8d70d4","type":"inject","z":"ce7d7a5e.e05188","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":840,"y":580,"wires":[["f85aca3.1724b38"]]},{"id":"c8d0c1df.9d9e2","type":"debug","z":"ce7d7a5e.e05188","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1150,"y":540,"wires":[]},{"id":"65c03a65.1774e4","type":"debug","z":"ce7d7a5e.e05188","name":"error","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1150,"y":580,"wires":[]},{"id":"2abbcd10.2c0472","type":"debug","z":"ce7d7a5e.e05188","name":"return","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1150,"y":620,"wires":[]},{"id":"588ca8df.9cc898","type":"json","z":"ce7d7a5e.e05188","name":"","property":"payload","action":"","pretty":false,"x":1150,"y":500,"wires":[["b5d23173.f80f8"]]},{"id":"b5d23173.f80f8","type":"debug","z":"ce7d7a5e.e05188","name":"out json","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1300,"y":500,"wires":[]}]
Nodes:
My python file:
Output debug: