Join Slack
Powered by
I just have one key, that I am passing from MAP to...
# suitescript
t
tuli
04/15/2023, 12:59 AM
I just have one key, that I am passing from MAP to reduce, still, reduce is getting called 2 times. What am I missing?
tuli
04/15/2023, 1:00 AM
It’s not because two items in values array for sure, I have tried with 10 items, it still runs two times.
tuli
04/15/2023, 1:01 AM
My understanding says, it should run once, since we have one key.
b
battk
04/15/2023, 1:53 AM
that only looks like it ran once
battk
04/15/2023, 1:54 AM
you can write the same key in a map to group multiple values together
battk
04/15/2023, 1:54 AM
the reduce will still only run once for that key, but will have multiple values
t
tuli
04/15/2023, 1:55 AM
Yeah, sorry battk, I am so dumb, I put two logs for the same and thought it ran twice.
tuli
04/15/2023, 1:56 AM
However, thanks a lot for your help.
2
Views
Open in Slack
Previous
Next