I have array as following, I need it to apply natural sort on this, on only text field.
var data = [{
"text": "1001",
"value": "212121"
}, {
"text": "1002",
"value": "32435"
}, {
"text": "A101",
"value": "324124324"
}, {
"text": "A12",
"value": "567y54645"
}, {
"text": "A123",
"value": "534534"
}, {
"text": "A21",
"value": "34534534"
}, {
"text": "A210",
"value": "5345345"
}, {
"text": "A33",
"value": "234234234"
},
"text": "B2",
"value": "4234234"
}, {
"text": "D10000",
"value": "34234234"
}, {
"text": "EZH43NUT8SD",
"value": "534534534"
}, {
"text": "H287",
"value": "43435345"
}, {
"text": "Pkg test",
"value": "5345345"
}]
I have tried following things so far :
AngularJS - Sorting ng-repeat on string with numbers in them
natural sortin this context?