title: Get length of same key in array of javascript objects
body: <pre><code>var arr = [{code:'A', number: 1}, {code:'A', number: 2}, {code:'B', number: 3 }]
  </code></pre>
  
  <p>How can I get a number of objects that has certain key in above array?</p>
  
  <p>For example, The number of <code>code: 'A'</code> objects is <strong>2</strong>.</p>
  
  <p>How to get it?  </p>