I am having a node that generates for each day of the year some power consumption data:
["01-06-2024",9,0,"test"]
["02-06-2024",10,7,"test"]
["03-06-2024",12,0,"test"]
["04-06-2024",5,1,"test"]
["05-06-2024",4,1,"test"]
["06-06-2024",2,0,"test"]
["07-06-2024",1,0,"test"]
... until
["31-12-2024",1,0,"test"]
I display these data in a dashboard.
I would like to add a dropdown with the months selection, so that only the data of the selected month will be displayed but I am struggling on creating a function to select only the lines relevant for the selected month.
Could ou help me on that function?
Many thanks,
Thomas
Yes, I’m able to capture this from the date as well, but how to build a function able to delete (or extract) all strings that are not from the relevant month ?
The data are coming from an external Energy provider database which I store in a local file.
Use a split node to create one message per day eg ["01-03-2024",9,0,"test"]
Then a function node can test the value of the month part of the date, something like this