You could convert the msg.payload.result
to an array. Then msg.payload.result[0]
will be today, and msg.payload.result[1]
would be tomorrow. But it relies on the object having same layout each time.
e.g.
[{"id":"1443affe2a15c0ed","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"url","v":"https://api.forecast.solar/estimate/watt_hours_day/39.7/2.97/45/0/1.2","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":2820,"wires":[["0aaf17df539748e2"]]},{"id":"0aaf17df539748e2","type":"http request","z":"da8a6ef0b3c9a5c8","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":350,"y":2820,"wires":[["715b5ab2d3b28abb"]]},{"id":"715b5ab2d3b28abb","type":"change","z":"da8a6ef0b3c9a5c8","name":"","rules":[{"t":"set","p":"payload.result","pt":"msg","to":"$$.payload.result.*","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":2820,"wires":[["a91123f4e56d6d55"]]},{"id":"a91123f4e56d6d55","type":"debug","z":"da8a6ef0b3c9a5c8","name":"debug 223","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":2860,"wires":[]}]
Or you could use a more complicated expression and create the date strings require to address your values.
e.g.
[{"id":"1443affe2a15c0ed","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"result\":{\"2023-01-06\":4568,\"2023-01-07\":4514},\"message\":{\"code\":0,\"type\":\"success\",\"text\":\"\",\"info\":{\"latitude\":39.7,\"longitude\":2.97,\"distance\":0,\"place\":\"Camà de Tirasset, Inca, Raiguer, Illes Balears, 07430, España\",\"timezone\":\"Europe/Madrid\",\"time\":\"2023-01-06T08:42:46+01:00\",\"time_utc\":\"2023-01-06T07:42:46+00:00\"},\"ratelimit\":{\"period\":3600,\"limit\":12,\"remaining\":8}}}","payloadType":"json","x":150,"y":2800,"wires":[["7f239f293c096fb5"]]},{"id":"7f239f293c096fb5","type":"change","z":"da8a6ef0b3c9a5c8","name":"","rules":[{"t":"set","p":"payload.today","pt":"msg","to":"$lookup($$.payload.result,$moment().format(\"YYYY-MM-DD\"))","tot":"jsonata"},{"t":"set","p":"payload.tomorrow","pt":"msg","to":"$lookup($$.payload.result,$moment().add(1, \"day\").format(\"YYYY-MM-DD\"))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":2800,"wires":[["a91123f4e56d6d55"]]},{"id":"a91123f4e56d6d55","type":"debug","z":"da8a6ef0b3c9a5c8","name":"debug 223","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":570,"y":2840,"wires":[]}]