0

I want to sort the Object keys so that they are all matching in order. In the below code you can see the second key differs,

$scope.myData = [
{
   "EmployeeId": "1",
   "OTHINC1": "200",
   "OTHINC2": "100"
},
{
   "EmployeeId": "2",
   "OTHINC2": "300",
   "OTHINC1": "100",
   "OTHINC3": "200",
}    
];

How to sort the Object Keys?

Anup
  • 8,072
  • 15
  • 62
  • 122
  • You can find an answer here: http://stackoverflow.com/questions/1069666/sorting-javascript-object-by-property-value – Mostafa Talebi Dec 01 '14 at 07:06
  • 1
    Always do a [google search](https://www.google.co.in/search?q=Sorting+the+Object+keys&oq=Sorting+the+Object+keys&aqs=chrome..69i57j69i60&sourceid=chrome&es_sm=122&ie=UTF-8) before posting a question – Satpal Dec 01 '14 at 07:07

0 Answers0