How to get a length of object in array of objects based on key : I have array with six objects,i want to get a object length based on key value(if it is repeated means,i want to get the length of ii as 2).This is my array of object structure.


[
{
"name":"aaa",
"id":"2100",
"designation":"developer"
},

{
"name":"bbb",
"id":"8888",
"designation":"team lead"
},

{
"name":"ccc",
"id":"6745",
"designation":"manager"
},
{
"name":"aaa",
"id":"9899",
"designation":"sw"
}

]


Any help would be appreciated...