I pull the rain data like this if undefined it returns 0
[{"id":"ffc02d8f.5c58c8","type":"inject","z":"8d22ae29.7df6d","name":"","props":[{"p":"payload.ChargeState","v":"11","vt":"num"},{"p":"msg.data","v":"{\"coord\":{\"lon\":0.28,\"lat\":50.77},\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"base\":\"stations\",\"main\":{\"temp\":285.29,\"feels_like\":283.19,\"temp_min\":284.26,\"temp_max\":285.93,\"pressure\":1000,\"humidity\":81},\"visibility\":10000,\"wind\":{\"speed\":2.68,\"deg\":279,\"gust\":7.15},\"rain\":{\"1h\":0.44},\"clouds\":{\"all\":87},\"dt\":1603706880,\"sys\":{\"type\":3,\"id\":2012607,\"country\":\"GB\",\"sunrise\":1603694438,\"sunset\":1603730684},\"timezone\":0,\"id\":2650497,\"name\":\"Eastbourne\",\"cod\":200}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":2140,"wires":[["1d751194.60f8de"]]},{"id":"1632356d.a64dc3","type":"inject","z":"8d22ae29.7df6d","name":"","props":[{"p":"payload.ChargeState","v":"11","vt":"num"},{"p":"msg.data","v":"{\"coord\":{\"lon\":0.28,\"lat\":50.77},\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"base\":\"stations\",\"main\":{\"temp\":285.29,\"feels_like\":283.19,\"temp_min\":284.26,\"temp_max\":285.93,\"pressure\":1000,\"humidity\":81},\"visibility\":10000,\"wind\":{\"speed\":2.68,\"deg\":279,\"gust\":7.15},\"clouds\":{\"all\":87},\"dt\":1603706880,\"sys\":{\"type\":3,\"id\":2012607,\"country\":\"GB\",\"sunrise\":1603694438,\"sunset\":1603730684},\"timezone\":0,\"id\":2650497,\"name\":\"Eastbourne\",\"cod\":200}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":2200,"wires":[["1d751194.60f8de"]]},{"id":"1d751194.60f8de","type":"function","z":"8d22ae29.7df6d","name":"","func":"msg.rain = msg.data.rain || {\"1h\":0};\nmsg.rain = Object.values(msg.rain)[0];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":2180,"wires":[["49952583.65b3fc"]]},{"id":"49952583.65b3fc","type":"debug","z":"8d22ae29.7df6d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":2160,"wires":[]}]