title: JavaScript Multi Dimentional Array
body: <p>I have created a multidimensional array for a jobs feed like so:</p>
  
  <pre><code>var jobs = [                
          ["JOB222" , "Painter"],                 
          ["JOB333" , "Teacher"],                 
          ["JOB444" , "Delivery Driver"],             
  ];
  </code></pre>
  
  <p>I can access the array using the index number</p>
  
  <pre><code>alert( jobs[2][1] ); // Alerts Delivery Driver
  </code></pre>
  
  <p>If I set the reference number manually, I can loop through the array to find a match.</p>
  
  <pre><code>var viewingJobRef = "JOB333";
  for (var i=0;i&lt;jobs.length;i++) {
  
      if (jobs[i][0] == viewingJobRef) {
        alert(jobs[i][1]); // This will alert Teacher
      }
  
  }
  </code></pre>
  
  <p>So my question is, is it possible to access the array directly and not use a loop?</p>
  
  <pre><code>var viewingJobRef = "JOB333";
  alert( jobs[viewingJobRef][1] );  // I want this to alert Teacher
  </code></pre>
  
  <p>Firefox error console says:
  <strong>jobs[viewingJobRef]is undefined</strong>, how do I do it?</p>