Hi, firstly I want to thank your help.
I’m struggling of how to count the duplicate occurrences from this array:
I have this array from several inquiries.
[
Ref(Collection("x"), "305800919607411200"),
Ref(Collection("x"), "305800919607411200"),
Ref(Collection("x"), "305800919607411201"),
Ref(Collection("x"), "305800919607411201"),
Ref(Collection("x"), "305800919607411201")
]
I’m expecting an output like:
[
Ref(Collection("x"), "305800919607411200"), 2,
Ref(Collection("x"), "305800919607411201"), 3
]
I’m not able to do it on my function.
In JS, I would use a reduce method, but I tried the logic using fauna Reduce, but I can’t.
Is there a kind hand to help me with this?
Thank you a million.