Solved! Go to Solution.
var _sort = function(field) { return function(a, b) { var x, y; x = a.attributes[field].toLowerCase(); y = b.attributes[field].toLowerCase(); return (x < y) ? -1 : 1; }; }; _featureSet.features.sort(_sort('FIELD_NAME'));
var _sort = function(field) { return function(a, b) { var x, y; x = a.attributes[field].toLowerCase(); y = b.attributes[field].toLowerCase(); return (x < y) ? -1 : 1; }; }; _featureSet.features.sort(_sort('FIELD_NAME'));
I needed to sort by two fields