I have an array that looks like the following:
[
{"version": "1.1"},
{"version": "1.2"},
{"version": "1.11"}.
{"version": "test1.3"},
{"version": "1.12"},
{"version": "1.4"}
]
I would like to order the objects in the following way.
1.1
test1.3
1.4
1.11
1.12
I'm not sure how I can sort the objects in my array to look like the above. I could iterate through with a loop and convert all the strings to numbers and then order by number? However some of the version have words in them such as "test1.3", so I'm not sure how that would work.
How can I sort my array in this example?