I then connect a function node after the "nordpool-api-plus" node for entering some javascript but this is where I need help;
1. How do i fetch next hours price?
Lets say I run the timestamp each hour, generating a array shown above with the actual days prices.
So at this time I want to fetch the price for object "23" in the array.
So you need to determine the hour you're in then use that to find the array with that index
e.g.
const date = new Date();
///date.setHours(date.getHours()+1); // uncomment for next hour
const index = date.getHours();
msg.payload = msg.payload[index].price
return msg;
your error is
You must return an object to each output.
eg. set the price to a msg property.