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