Can anyone help me with why this JSONata, $$[$number($now('[h#1]'))].Price/10
, won't give me the electricity price when I have this array in the payload with prices per hour in a day. The test of it works but all I get is the whole first array object. I just realised I should specify payload
somewhere in the start of the JSONata but I'm unable to get a change in behaviour:
[
{"Area":"Oslo","Timestamp":"2019-11-14 00:00","Price":408.01,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 01:00","Price":404.87,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 02:00","Price":401.42,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 03:00","Price":402.53,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 04:00","Price":407.81,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 05:00","Price":416.33,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 06:00","Price":440.89,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 07:00","Price":504.81,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 08:00","Price":513.84,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 09:00","Price":498.22,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 10:00","Price":479.34,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 11:00","Price":486.55,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 12:00","Price":493.55,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 13:00","Price":497.2,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 14:00","Price":527.44,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 15:00","Price":531.6,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 16:00","Price":551.49,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 17:00","Price":600.6,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 18:00","Price":489.49,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 19:00","Price":457.22,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 20:00","Price":433.58,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 21:00","Price":426.68,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 22:00","Price":416.64,"Valuta":"NOK/MWh"},
{"Area":"Oslo","Timestamp":"2019-11-14 23:00","Price":412.68,"Valuta":"NOK/MWh"}
]