title: Search by multiple values in object
body: <p>According to these answers, I should be able to search object by the multiple values.</p>
  
  <p><a href="https://stackoverflow.com/questions/5181493/how-to-find-a-value-in-a-multidimensional-object-array-in-javascript">How to find a value in a multidimensional object/array in Javascript?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/2722159/javascript-how-to-filter-object-array-based-on-attributes">Javascript: How to filter object array based on attributes?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8809425/search-multi-dimensional-array-javascript">Search multi-dimensional array JavaScript</a></p>
  
  <p>Unfortunately <code>filter()</code> doesn't return anything. Same goes for jQuery's <code>grep()</code>.</p>
  
  <p>Google 5 pages, still can't find the solution.</p>
  
  <p>Please help. Thanks</p>
  
  <p><a href="https://jsfiddle.net/4z90rvk3/" rel="nofollow noreferrer">https://jsfiddle.net/4z90rvk3/</a></p>
  
  <pre><code>var itemPrices = {
          '1':  { 'catid': '1', 'typeid': '1', 'price': '1000' },
          '2':  { 'catid': '1', 'typeid': '2', 'price': '1000' },
          '3':  { 'catid': '1', 'typeid': '3', 'price': '1100' },
          '4':  { 'catid': '2', 'typeid': '1', 'price': '1000' },
          '5':  { 'catid': '2', 'typeid': '2', 'price': '1000' },
          '6':  { 'catid': '2', 'typeid': '3', 'price': '1100' },
          '7':  { 'catid': '3', 'typeid': '1', 'price': '1200' },
          '8':  { 'catid': '3', 'typeid': '2', 'price': '1200' },
          '9':  { 'catid': '3', 'typeid': '3', 'price': '1300' },
          '10':  { 'catid': '4', 'typeid': '1', 'price': '1200' },
          '11':  { 'catid': '4', 'typeid': '2', 'price': '1200' },
          '12':  { 'catid': '4', 'typeid': '3', 'price': '1300' },
      };
  
      var price = itemPrices.filter(function(item) { return item.typeid == 1 &amp;&amp; item.catid == 2; });
  
      $('body').append(price);
  </code></pre>