Hello experts!
I'm trying to fill a dropdown but cant get it work! Whats wrong with my code?
var msg2 = {};
msg2.options = [];
for (let i=0; i<msg.payload.length; i++)
{
var label = msg.payload[i].Timestamp__OrderStart.toLocaleString()+"; Anzahl: "+msg.payload[i].PartsCount.toString();
var value = i;
var s = {label:value};
msg2.options.push(s);
}
return msg2;
{"options":[{"label":0},{"label":1},{"label":2},{"label":3},{"label":4},{"label":5},{"label":6},{"label":7},{"label":8},{"label":9}],"_msgid":"82856354.20b3"}