Hi Guys i need small help in getting this solved.
If this is a duplicate post please point me to the original question.
Here I have an JSON array of elements
Ex : var consume = [{"key":"Test1"},{"key":"Test2"},{"key":"Test3"},{"key":"Test1"},{"key":"Test3"},{"key":"Test1"}];
Expected OutPut:
var produce = [{"name":"test1","count":3},{"name":"test2","count":2},{"name":"test3","count":2}]