I'm trying to sort an array based on the first digit encountered in the title.
My attempt was replacing the non-numeric characters with '' (title.replace(/\D/g, ''). It gives me back the digits but I'm not sure how to sort the array from this point.
So, test0 first followed by test1, test2 and test3.
model = [
{
"title": "test3"
},
{
"title": "test1"
},
{
"title": "test2"
},
{
"title": "test0"
}
];