Better data structure to handle this array
<p>I have an array of data get from the server(ordered by date):</p>

<p><code>[ {date:"2012-8", name:"Tokyo"}, {date:"2012-3", name:"Beijing"}, {date:"2011-10", name:"New York"} ]</code></p>

<p>I'd like to :</p>

<ol>
<li>get the name of the first element whose date is in a given year, for example, given <code>2012</code>, I need <code>Tokyo</code>  </li>
<li>get the year of a given <code>name</code></li>
<li>change the date of a <code>name</code></li>
</ol>

<p>which data structure should I use to make this effective ?</p>

<p>because the array could be large, I prefer not to loop the array to find something</p>
