This is the continuation of this question which is here How to group by dynamic key value of an object of arrays(Month and year) Here i am getting output as expected but i want a small change on the output. The out put which is producing right now is as follows.
But the result which i am expecting is goes like this.
Code which i am using is like this.
//Stack to retrive result
let filteredStack:any =[];
//Sorting based on the sorted key
sortedKeys.forEach(k => {
filteredStack.push(k,result[k]);
});
How can i do this?