I have a Site ID's Array at present it is displayed as 112 110 109 108 107 105
But i want to display it in Ascending order please help 105 107 108 109 110 112
the typescript is like this
item.siteIDs = [];
(this.subscriptionData || []).forEach((subscription, key) => {
subscription.sites.filter((obj: any) => {
if (obj.addressId == item.entityId && !item.siteIDs.includes(obj.siteId)) {
item.siteIDs.push(obj.siteId);
}
});
html like this
<td class="col-md-1">
<div *ngFor="let siteId of item.siteIDs">
{{ siteId }}
</div>
</td>