Hi,
So, I've been working on a certain project and this forum has been a great help in getting it done. Thank you.
I have recently been working with a Json object and running a for loop to get some values from it. I tried to use a delay node to send one message at a time but I keep loosing values the way I set it up. even with rate limit option.
var ts = msg.payload.VeriBalancePlatformPOSLog.Transaction[0].TenderControlTransaction[0].TillSettle[0].TenderSummary;
var len=ts.length;
for (var z=0;z<len;z++)
{
var tdr = ts[z].Ending[0].$.TenderType;
var amt = ts[z].Ending[0].Amount[0]._;
var tdr = Number(tdr);
var hr = flow.get("hourf");
var mn = flow.get("minf");
var sec = flow.get("secf");
var padday = flow.get("pdf");
var yearr = flow.get("yearf");
var seqn = Number(flow.get("seqf"));
var tid = flow.get("tidf");
var all = { "length" : len, "tender" : tdr, "amount" : amt, "year" : yearr, "pd" : padday, "hour" : hr, "min" : mn, "second" : sec, "seq" : seqn, "tids" : tid};
//var all = { "length" : len, "tender" : tdr, "amount" : amt};
msg.payload = all;
node.send(msg);
(I'm trying to add a 2 second delay here after each value is returned)
}
Is this a possibility to add a delay in the function itself?
Thank you in advance.