lodash count unique of field
<p>I have an array of 500 objects each object looks like this:</p>

<pre><code>{name: 'Hello', phone_num: '1234'}
</code></pre>

<p>Now i wish to find out how many there is of each name.  So i wish to convert my array into the following:</p>

<pre><code>[{name: 'Hello', count:15}, {name:'Marc', count:5}]
</code></pre>

<p>So i wish thinking of using <code>lodash</code> for this but looking at their documentation i haven't been able to find an answer.</p>

<p>They have something called <code>countBy</code> but it doesnt seem to be sufficient for this issue.</p>

<p>Can anyone help me out?</p>