How to seperate the number from the string

i’m trying to get the duration just like this;

“duration”:“2h 22min”,
to
“duration”:“142”,

`{
title: ‘The Godfather’,
year: ‘1972’,
director: ‘Francis Ford Coppola’,
duration: ‘2h 55min’,
genre: [‘Crime’, ‘Drama’],
rate: ‘9.2’
}

function turnHoursToMinutes() {
var newArray = movies[1].duration.split(’ ')
return newArray[0];
}
turnHoursToMinutes();`