Array of objects
this.sampleArray = [{ID: 176, active: true },
{ID: 181, active: false },
{ID: 186, active: true }];
How to use Angular TypeScript to order them in descending order.
I am using the following:
const result= _.sortBy(_.where(this.sampleArray, 'ID')).reverse();
But this is not reliable as the ID order keep on changing from descending to ascending. I am using underscore library