How to skip same values and get array length
<p>I have my example array:</p>

<pre><code>var person = [{
    firstName:"John",
    lastName:"Doe",
    age:46
},
{
    firstName:"Alexander",
    lastName:"Bru",
    age:46
},
{
    firstName:"Alex",
    lastName:"Bruce",
    age:26
}];
</code></pre>

<p>Simple <code>person.length</code> gives me the length of my array, but I need to merge values when the age is the same. So if two people have same age return <code>1</code> no <code>2</code>. Sorry for my bad English, I can made a mistakes.</p>