title: How to simplify nested loops and conditions?
body: <p>Given a JS as follows:</p>
  
  <pre class="lang-js prettyprint-override"><code>for (c in chars) {
      for (i in data) {
          if (data[i].item === chars[c]) {
              // do my stuff;
          }
          else { /* do something else */}
      }
  }
  </code></pre>
  
  <p>and data such:</p>
  
  <pre class="lang-js prettyprint-override"><code>var chars = [ 'A', 'B', 'C', 'A', 'C' ];
  var data = [
      {'item':'A', 'rank': '1'}, 
      {'item':'B', 'rank': '2'}, 
      {'item':'C', 'rank': '3'}
      // no duplicate
  ];
  </code></pre>
  
  <p>Is there a simpler syntax to express that rather than nested <code>for</code> loops and inner conditions?</p>
  
  <p>I try to match two datasets, more precisely to use <code>chars</code>'s keys to iterate <code>data</code> and find values.</p>