I have a object parameter with a property and value like
$scope.chartOptions.response.items.count = { amazing: 8, amenities: 6, awesome: 7, beautiful: 15, better: 9, clean: 12, comfortable: 8, complaint: 6, definitely stay: 6, excellent: 11, friendly: 17, front desk: 8, good: 15, gorgeous: 6, great: 28, helpful: 11, nice: 15, perfect: 7, the best: 10, wonderful: 12 }
The array has value of 20 indexes. The array looks like
series[] = ["great", "friendly", "good", "beautiful", "nice", "wonderful", "clean", "excellent", "helpful", "the best", "better", "comfortable", "front desk", "amazing", "perfect", "awesome", "amenities", "complaint", "gorgeous", "definitely stay"]
I want to sort the object according to values in the array and store all the numerical values in a second array like series2[]= [28, 17, 15...]
Is this possible using angularjs and javascript