I have such JSON data:
var jsondata = [
{
data: 'MacOS Sierra 10.12.13'
},
{
data: 'MacOS Sierra 10.12.5'
}
];
I need to select newest version of MacOS in this array. How to implement in better? I've tried to remove all alpha-numeric values and convert versions of mac to integers but it might not work in some situations (for example 101213 will be bigger then 10135).
Will really appreciate your help.