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
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.