What javascript array, nested array, object is most suitable for searching
<p>I'm trying to build a colors structure that has 3 data per item. For example, red has x and y, blue has x and y, etc. So the 3 pieces of data are <code>color, x, y</code></p>

<p>What structure do I need to make it easy to read the x and y based on the color. I usually do <code>push(color, x, y)</code> but that wouldn't work here, because I need to search quickly by the color without needing to loop. What structure do I need here, and how do I set it and get it. </p>
