I have an array for example
var Fruits : ["apple","banana","apple", "orange","banana","kiwi","orange"];
Now I want to get the count with removing duplicate values in below type object array
0: fname: "apple"
Count: 2;
1: fname: "banana"
Count: 2;
2: fname: "orange"
Count: 2;
3:fname: "kiwi"
Count: 1;
Can anyone help me to get this object array