so I have a few arrays for different datasets that look similair to this one:

```
[["zufrieden",10],
["beschämt",24],
["gelangweilt",50],
["begeistert",28],
["unsicher",27],
["niedergeschlagen",49],
["verärgert",72],
["frustriert",29], 
["entspannt",25],
["unsicher",27],
["unsicher",31],
["schuldig",22],
["frustriert",18], 
["gelangweilt",73],
["wütend",30],
["verlegen",50],
["besorgt",25],
["schwermütig",0]] 

```

How can i get, for example, the average value of all entries with "schuldig".
Also, I need to do this for every single key that is represented by a string in this case. 
I tried converting the array to an object and go from there, but I'm stuck and would appreciate any help.

I already came as far counting the occurences of the different strings using the map function.

```
var counts = {};
orderedFeelings.forEach(function(x) { counts[x] = (counts[x] || 0)+1; });
var countsValues = Object.keys(counts).map(function(key){ return counts[key] });

```

This is okay for my intent to visualize the data as it returns a list of the occurences, but in order to create a detailed graph, I need to have the average value of all values with the same keys. This is where I'm completely stuck.