I have an array with some duplicates value. I have removed all duplicates value and get his count(repeat). Now I have to sort this data according to his count.
Example:
let duplicatis_data = ['a','a','b','b','b','c','c','c','c','d','e'];
Expected output
c->4
b->3
a->2
d->1
e->1
There is lots of example with removing the duplicates and return the count but they did not make filter according to count. So this is not a duplicate of those questions like below.