title: SQL Having, but in Javascript way
body: <p>So I came up here in the javascript to convert the SQL Query but using Javascript.</p>
  <p>the following SQL statement lists the number of customers in each country. <strong>Only include countries with more than 5 customers</strong>:</p>
  <pre><code>SELECT COUNT(CustomerID), Country
  FROM Customers
  GROUP BY Country
  HAVING COUNT(CustomerID) &gt; 5;
  </code></pre>
  <p>please see my JS object of an array below and his expected output.</p>
  <pre><code>//my array
  [
    {
      customerID: 1,
      CustomerName: &quot;Alfreds Futterkiste&quot;,
      contactName: &quot;Maria Anders&quot;,
      country: &quot;Germany&quot;,
    },
    {
      customerID: 2,
      CustomerName: &quot;Ana Trujillo Emparedados y helados&quot;,
      contactName: &quot;Ana Trujillo&quot;,
      country: &quot;Mexico&quot;,
    },
    {
      customerID: 3,
      CustomerName: &quot; Antonio Moreno Taquería&quot;,
      contactName: &quot;Antonio Mereno Jr.&quot;,
      country: &quot;Mexico&quot;,
    },
  ];
  
  //expected output
  [
    {
      country: &quot;Mexico&quot;,
      count: 2
    },
    {
      country: &quot;Germany&quot;,
      count: 1
    },
  ]
  </code></pre>
  <p><strong>We can use lodash or any library to solve this</strong></p>