Array sorting based on another array?

Is anyone able to help to sort the dates in this format?

 var dates = [
    'May 24',
    'Jun 15',
    'Jan 26',
    'Nov 7',
    'Nov 22',
    'Feb 22',
    'Oct 21',
    'Oct 4',
    'Sep 12',
    'Jan 22',
    'May 25',
    'Dec 11',
    'Dec 8',
    'May 17',
    'Apr 12',
    'Apr 14',
]

I realize that the lookup object is probably needed it this case
like

var months_map = {
    'Jan': 1,
    'Feb': 2,
    'Mar': 3,
    'Apr': 4,
    'May': 5,
    'Jun': 6,
    'Jul': 7,
    'Aug': 8,
    'Sep': 9,
    'Oct': 10,
    'Nov': 11,
    'Dec': 12,
 }

or simpler

var months_order = [ 'Jan', 'Feb', ' Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']

So far I only know of a way to sort a simple one-dimensional array based on another one-dimensional array.

var itemsArray = [10,5,7,4,1,2,3,1,2,3,4,5];
var sortingArr = [1,2,3,4,5,6,7,8,9,10];
itemsArray = sortingArr.filter(v => itemsArray.includes(v));
console.log(itemsArray)

By the way, if it would be interesting for someone. I wrote a solution to the problem.

let dates = [
    'Nov 24',
    'Nov 25',
    'Sep 14',
    'Mar 7',
    'Jan 25',
    'Jan 12',
    'Mar 2',
]

let monthsOrder = [
    'Jan',
    'Feb',
    'Mar',
    'Apr',
    'May',
    'Jun',
    'Jul',
    'Aug',
    'Sep',
    'Oct',
    'Nov',
    'Dec',
  ]

datesSplitted = dates.map(item => item.split(' '));

function sortFunc(a, b) {
  return monthsOrder.indexOf(a[0]) - monthsOrder.indexOf(b[0]) || a[1] - b[1];
}

console.log(datesSplitted.sort(sortFunc).map(item => item.join(' ')));