I have an array with this mock:
export class Task {
id: number;
title: string;
state: number;
priority: number;
describtion: string;
}
This array is filled with multiple entries and each has a priority from 1-5.
How can I sort this array by its priority (asc)?