Bruce Gust
asked on
How do I return distinct values and their counts in an array?
I've got to write a function that returns distinct values in an array and their counts. So if my list of values is is "1 3 5 3 7 3 1 1 5", then I need to return: "1(3) 3(3) 5(2) 7(1)"
How?
How?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Had to go with pure JS and this worked!
Thanks!
Thanks!
here is a sample code:
Open in new window
You may also check out this fiddle.
Giannis