Create multi-dimensional array index in Javascript?
<p>I have a ajax request that is returning to me an object that looks roughly like the following:</p>

<pre><code>[
 {category: "Test Category", id: "1", name: "Test",  language: "English"},
 {category: "Test Category", id: "2", name: "Test2", language: "English"},
 {category: "A test",        id: "3", name: "Test3", language: "Spanish"},
 {category: "Test Category", id: "4", name: "Test4", language: "Spanish"}
]
</code></pre>

<p>Basically I need a way to do the following:</p>

<ul>
<li>List all categories that exist in ONLY English or Spanish</li>
<li>List all ID's that exist in a specified language</li>
<li>List all ID's that exist in a specified category</li>
</ul>

<p>Now I'm fairly sure the best route to do this is to create my own temp arrays that can house that data but I'm not confident enough in Javascript to write the correct loop to get that data. I know in PHP I'd do something like <code>$category['Test Category'][] = 3</code> while looping.</p>

<p>The idea is I need the ability to filter things based on the user selecting to filter by English and then by a category within that.</p>

<p>Can someone point me in the right direction?</p>
