title: Efficient way to Count Certain Grouped Values jQuery Array
body: <p>I have an array of people. I want to get the counts of the entire list grouped by each Level and Gender combination. I want to store these results in separate variables that I can display whenever I want in any order. </p>
  
  <p>For instance, get the count for Level B Males and store that in a variable, Level B Females and store that in a variable, and Level B Nonbinary, Level A Males, Level A Females, and Level A Nonbinary, and so on through other levels storing those in their own variables. If storing them in an array is better (and it probably is), the order stored should be Level A Male, Female, Binary down to level Z Male, Female, Binary.</p>
  
  <p>Also, I would like the totals of each Level as well.</p>
  
  <p>I wrote up some stuff in the jsfiddle using a filter, but I've only done Level A. It will be too many lines of code doing Level B, C, D, etc. I think it can be much shorter and cleaner using a loop or something. Can anyone help me find a more efficient method?
  <a href="http://jsfiddle.net/cM94j/2/" rel="nofollow">http://jsfiddle.net/cM94j/2/</a></p>
  
  <pre><code>var list ={"PEOPLE": [
      {  "name": "Bob",  "level": "A",  "gender": "F"},
          {  "name": "Sue",  "level": "B", "gender": "F"},
         {  "name": "Molly",  "level": "A", "gender": "M"},
         {  "name": "Joe",  "level": "B", "gender": "N"},
          {  "name": "Jack",  "level": "B",  "gender": "F"}
          ]};
  </code></pre>
  
  <p>Also, at most this list will have ~80 people and Levels A-H. Going off tangent, with those specs, would I be better off putting this data into a spreadsheet of some kind like excel. It's not a big enough project for a database. How would I output to a website if I do go that route? Should I be outputting these server-side instead of using jQuery?</p>