I'm trying to use charts.js, but to insert the values I need them in a specific order.
First I have this array, that contains the members in order:
members = ['john', 'elise', 'mark']
And I also have a code that gives me this return:
membersReturn = ['john', 'john', 'john', 'john', 'mark', 'mark']
So I need to have a result like this:
result = [4,0,2] //4 of john, 0 of elise and 2 of mark.
The order of the members needs to be the same and add 0 for no value.