I am trying to sort an array with objects based on multiple attributes. I.e if the first attribute is the same between two objects a second attribute should be used to comap
If you happen to be using Angular, you can use its number filter in the html file rather than adding any JS or CSS handlers. For example:
No fractions: {{val | number:0}}
In that example, if val = 1234567, it will be displayed as
No fractions: 1,234,567
Example and further guidance at: https://docs.angularjs.org/api/ng/filter/number